fixing a value into a drop down field.

rvd48

Registered User.
Local time
Today, 20:46
Joined
Feb 2, 2004
Messages
123
in my main form, i have a the text box called: "Emloyee" which comes up as e.g. "Smith,John". i.e. if my end user ever gets more employees then they can use the drop-down list.

i want it to select "Smith,John" when im making a new record, usually the box is just empty even after i go into the box properties and type into the "default value" field: [Smith] & [John]


could any help me on getting the "Employee" field to show "Smith,John" when i make a new record.

btw, my record source is: SELECT [EmployeeID], [LastName] & ", " & [FirstName] FROM Employees ORDER BY [LastName] & "," & [FirstName]; .
 
You may have to clarify it a bit. Is the box you to display the info a text box or a combobox (dropdown) ?

Assuming you are talking about a combobox, it is usually bound to column 1 which is normally a hidden column containing the primary key.

If so, set the default value to 1 (assuming the corrisponding record in the table is John Smith)

Otherwise, in the Form_Current event put Me.ComboBoxName = Me.IDFieldName
This way the combo box will follow the employee name.

Hope I'm on the right track.

Dave
 
Oldsoftboss said:
You may have to clarify it a bit. Is the box you to display the info a text box or a combobox (dropdown) ?

Assuming you are talking about a combobox, it is usually bound to column 1 which is normally a hidden column containing the primary key.

If so, set the default value to 1 (assuming the corrisponding record in the table is John Smith)

Otherwise, in the Form_Current event put Me.ComboBoxName = Me.IDFieldName
This way the combo box will follow the employee name.

Hope I'm on the right track.

Dave


its just a normal text box, but is drop down.
 

Users who are viewing this thread

Back
Top Bottom