I used a combo box to let user select "Proejct Status" such as active, completed, cancled. I want to set active as a default selection if user does not choose other status. How can I do that? Thank you very much for your help.
i have a two column that one stores a professions and other stores a number of the profession like that:
number professions
1 singer
2 police man
3 teacher
"number" column is a combo box, that boundColumn property is two.
i want that in the form when i choose a value in a combo box i will see the profession in other text box in my form.if i choose 2 in combo box i see in a other text box in my form police man.
I have a main form containing client details (tbl_Client) and a sub form containing notes (tbl_notes). tbl_Notes contains a foreign key field (Client_ID) which is obviously the primary key in tbl_Client.
The client is chosen on the main form using a combo box where the user selects the clients name. the id is not visable to the user. How can i get it so that the id (Client_ID) of the selected user is inserted into the Client_ID field of tbl_notes.
I have a table called Contacts and a form with two combo boxes for searching for records either by name or property name. The following code works fine for finding the first record, but I want to be able to show on the form all (and only) those records which match the combo box entry. Currently rowsource for name box is: ************************************************** * SELECT [Last Name1] FROM Contacts UNION SELECT [Last Name2] FROM Contacts ORDER BY Contacts.[Last Name1]; ************************************************** * and code is: ************************************************** * Private Sub Combo214_AfterUpdate() ' Find the record that matches the control for Last Name search Dim rs As DAO.Recordset
Set rs = Me.Recordset.Clone rs.FindFirst "[Last Name1]= '" & Me.[Combo214] & "' OR [Last Name2]= '" & Me.[Combo214] & "'" rs.FindNext "[Last Name1]= '" & Me.[Combo214] & "' OR [Last Name2]= '" & Me.[Combo214] & "'" If Not rs.EOF Then Me.Bookmark = rs.Bookmark Combo214.Value = "" txtFirstName1.SetFocus End Sub ************************************************** * Rowsource for property box is: ************************************************** * SELECT Contacts.PropertyID, Contacts.PropertyName FROM Contacts ORDER BY Contacts.PropertyName; ************************************************** * and code is: ************************************************** * Private Sub Combo212_AfterUpdate() ' Find the record that matches the control for Property Name search Dim rs As dao.Recordset
Set rs = Me.Recordset.Clone rs.FindFirst "[PropertyID] = " & Str(Nz(Me![Combo212], 0)) If Not rs.EOF Then Me.Bookmark = rs.Bookmark Combo212.Value = "" cboPropertyName.SetFocus End Sub ************************************************** **
Hello, I have a combo box called (cboridge) bound to a table called (Ridge)with two fields/columns called (dollar amount) (Material type)with 4 different options/records, when the user selects his option/field the dollar amount shows stays visible in the (cboridge) combo box Then I have a text box called (txtridgetot) that has a calculation in it, but I need different calculations per option/field that's picked. Can each option/record that is chosen have a different calculation associated with it in the (txtridgetot) text box.
In other words if the user selects the third option/field called shake ridge could I have a calculation that would run and have it display the sum of this calculation in the text box (txtridgetot).
Hello, I have a combo box called (cboridge) bound to a table called (Ridge)with two fields/columns called (dollar amount) (Material type)with 4 different options/records, when the user selects his option/field the dollar amount shows stays visible in the (cboridge) combo box Then I have a text box called (txtridgetot) that has a calculation in it, but I need different calculations per option/field that's picked. Can each option/record that is chosen have a different calculation associated with it in the (txtridgetot) text box.
In other words if the user selects the third option/field called shake ridge could I have a calculation that would run and have it display the sum of this calculation in the text box (txtridgetot).
If so could you please describe how?
Thanks-- Any help will be greatly appreciated.http://forums.aspfree.com/newthread.php?do=newthread&f=18# Hello!
I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.
The variables are 'Payment in 30 days" " Payment upfront"
if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date if "payment upfront" is selected the field on the form will enter todays date.
This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.
I've tried a few different ways to enter this but i can't quite get it to work as i want.
In my database I have a table that keeps track of a package of items. The package is assigned a package type (counter display, end cap, half pallet, full pallet for example). The record of the association of the package and it's type is held in the main table.
Each of these package types is either a case or a pallet (counter display and end cap are cases and half and full pallets are pallets) This relationship is kept in another table (we will call it description table).
Now, based on the type of package and therefore it being a case or pallet a UPC and a GTIN number are assigned. The GTIN number is different if it is a case or is a pallet. I have a table that stores all of the UPC and GTIN numbers available in 3 columns, one for UPC, one for GTIN Case and one for GTIN Pallet (the UPC is a standard 12 digit and the GTINs are 14 digit -with the first 2 different to designate pallet or case. and all are based on the check digit formula necessary)
The user assigns the UPC and correct GTIN number by clicking a button which applies the next available UPC code to the package and determines if the description of the type (case or pallet) and inserts correct GTIN number into that field. I actually have all of this functioning correctly.
Now the problem. If a user changes the package type, and therefore changes the description, I need to add code to the update event of the combo box that gives the choices for package type that does the following:
Check to see if the original package type was a case or pallet (it's description) and if by changing the package type it is now changed to the other, update the record in the main table to the correct GTIN number based on the existing UPC Code.
OR as I write this, maybe the code could simply update the main table with the correct GTIN code based on the new description and the existing UPC code. This was I would not need to check for a change just do the update every time.
I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).
Currently in order to set the default value, I have used the following code for each default;
Private Sub Form_Load() Forms!frmMediaLabeller!CboDriveName.DefaultValue = """D"""
End Sub
However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D: Drive. I have tried to replace the D above with an SQL statement but with no success.
Private Sub Form_Load()
Dim Drivename As String
Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));
Scenario: I have a combo box in an evaluation db that is set up to return 3 columns - EmpID, Name, JobID. The combo box only shows Name, but properly updates the neccessary fields on the screen.
Problem: I would like to turn the JobID txt box into a combo box that would default to null prior to a Name selection (on a new record) and then default to the recorded JobID after Name selection. 99.9% of the time, this won't be used, but occasionally an employee will receive an evaluation for a JobID they did, but were not officailly assigned.
The right way to do it would be to create a second record in the primary system that I am polling the data from, but that is not feasible given the nature of that system.
I'm obviously doing something stupid in my form :-) If you open the form in the attached sample you will see that I have 2 combo boxes. One of them has a default value showing and the other doesnt, I want to get the second combo to automatically show the value in the list but just cant seem to get this to work...
I cant work out whats different bewteen the two. Been tearing my hair out here so would appreciate some input.
In my form I have a combo box that is bound to a product/specification table.
When clicked, this combo box displays a list of products, each with its respective set of specifications (although I configured it so just the product column can be seen.) The reason I do this, is so that the specification values (against which certain other values in the form is critiqued) will be a static value in the form itself, and not a changeable value in a table.
What I want to do, however, is to let the combo box assume a default value when the form load (it must already have a product selected at start-up.)
Can some one help me with how to set a default text on a combo box whose record source is set to a query?
I have a form with two combo boxes. The first combo box’s record source is set to the following query:
SELECT chrCategoryID, chrCategoryName FROM tblGuarCategory; My 2nd combo box will list all the items based the category I select on the first combo box.
But when the user opens the form, instead of showing both combo boxes blank, I would like to display the following text:
Combo Box1: Select a category Combo Box2: Select an item…
I tried to use the combo box’s Default Value property like = “Select a category”. It didn’t work. I am not sure what is missing here. I appreciate your help.
I am sure this is a very basic problem but I just can't seem to make it work...
I have a form with a combo box. The values for the combo come from a table listing available month and year of various data. When the vlaue is selected in the combo box, the form refreshes the data to display that month and updates another table with that month that is used for a few different functions. Everything works great except that when you open the form, there is no value displayed in the combo box. What I would like for it to do is display the month that is equal to the value found in the second table, since that is considered to be the current month. I have tried various approaches to setting the default value and using a query in the control source but It still shows no value when opened. Any advice would be appreciated....
:confused: I was wondering if somebody can help with my default combo box problem?
I have a secured database whereby users logon, which is used as a scratch pad for keeping track of Purchase orders. A Form frmUserInput with two relevant fields for this problem 1. User Initials txtUsersInitials and 2. POBook (Purchase Order Book) which is the combo box cboPOBooks both unbound fields on the form.
The txtUsersInitials is generated automaitcally when the form is loaded using a VBA statement txtUsersInitials = Current User.
The list of the combo box is generated from a table tbleUsersPOBook and uses a query qryUsersDefaultPOBook as listed below;
SELECT tblUsersPOBook.UsersPOBookName FROM tblUsersPOBook WHERE (((tblUsersPOBook.UserName)=[Forms]![frmUserInput]![txtUsersInitials]));
This generates a drop box showing the Different department codes for each individual. So for some it is only one item for others up to three codes, this part works fine... :)
:cool: However here is my problem.
Since some people can sign off more than one Purchase Order book I have had to add an additional field in the table tblUsersPOBook called DefaultUsersPOBook which is a yes/no field, so only one yes exists for each user who logs on. I have created another query qryDefaultPOBook as listed below;
SELECT tblUsersPOBook.UsersPOBookName FROM tblUsersPOBook WHERE (((tblUsersPOBook.UserName)=[FORMS]![frmInputForm]![txtUsersInitials]) AND ((tblUsersPOBook.UsersPOBookDefault)=Yes));
When I place this query in the Default section of the combo box it gives me no result.
Firstly is it possible to have a varying default like this since each user will have a different default?
Or is there maybe a better way of achieving a default which is variable for each user based on thier default Purchase order book in the table tblUsersPOBook for the field "Yes" in DefaultUsersPOBook ? :confused:
I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this
Dim SQL AS String
SQL = "SELECT Address FROM Table1 WHERE Name = Forms!Main_frm!name_lbx.Value;"
Forms!Address_frm!address_cbx.DefaultValue = SQL
I have also tried
Dim SQL AS String
SQL = DoCmd.OpenQuery([update address_qry])
Forms!Address_frm!address_cbx.Value = SQL
Where update address_qry is the same as the above.
I keep both forms. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.
I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this
Dim SQL AS String
SQL = "SELECT Address FROM Table1 WHERE Name = Forms!Main_frm!name_lbx.Value;"
Forms!Address_frm!address_cbx.DefaultValue = SQL
I have also tried
Dim SQL AS String
SQL = DoCmd.OpenQuery([update address_qry])
Forms!Address_frm!address_cbx.Value = SQL Where update address_qry is the same as the above.
I keep both forms open. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.
I have been tasked w/ creating a database to schedule and track incoming cases for my job (Dental Lab)
This entire thing is new to me but have developed most of it through reading this forum so thanks for that! I still have a long way to go...
Here is what I am stuck on - I have a table of technicians here you can add the first name, last name, and department (The department is coming from another table called department)
These are working fine,
Now I have a table for the doctors to fill out a form to initiate a new case, In this table I have a field called techassigned1 which pulls from a query of the technician table where the deptmant is set to plaster bench.
This works fine - I get a dropdown box with the technicians name that is assigned to the plaster bench (This name changes periodically)
But All I want is for that 1 name to be set as a default value - I need it in the table so I know who started the work on the case I dont want the doctor to have to choose this name
I read in the forum and used Me!techassign1.DefaultValue = Me!techassign1.ItemData(0) in the forms ONOpen event
But this is what happens The form just displays #Name? in the dropdown box but the correct name is under it if I click the arrow But if I right click and look at the property sheet the name is in the default value property but it still doesnt update the techassign1 field in the table.
Is there a way to have this automatically add the technician from the query to the table? without haveing to select it?
Any help is greatly appreciated - If I am not making sense plese let me know and I will try to explain it better.
Hi all...I have a combo drop down box that has the 50 states in it. I would like the list to pop to the first state that starts with a letter typed in. For exampe, you type 'C', takes you right to CA.
I have combo boxes that have all been created using the wizard with the options Yes, No and Not Applicable. There is no default set but they default to the second entered option ("No") every time. I have created the form a second time in the hope this would do something but to no avail. Any ideas??
I got a COMBO BOX with 2 columns , for instance code and name.
CODE NAME 123 JOHN 124 JACK 125 BILLY 126 MARY
In the OPEN form action which the form using this combo to do some query action, I want to put a default value to this combo box after a VBA query result of which should return a name to this form. Just want to know how to put the result to this combo box, e.g. when the VBA query return a name Billy. What's the syntax to make this combo box equal to Billy and do corresponding query?? Thans a lot!! FOr the time being I just know the following syntax, but since the combo box got 2 columns and how can I know Billy is located in the third record?
i have a combo box on my form that uses UNION query to put "<select>" as part of the list items.right now "<select>" appears on top of the list but what i mtrying to do is when the form loads i want the combo box to have "<select>" selected and not just show blank unless someone click on the down arrow. i m sure there is a way/propoerty to do it but i cant figure it out. Also how can i make my combo box so user cant type in a combo box but select from the list.