setting the value in a combobox

Stingfish

Registered User.
Local time
Today, 16:53
Joined
Jul 29, 2003
Messages
24
I have an unbound combo box that finds the record that matches the control on a form. When the form first opens the combobox is blank. How do set the combo to the very first record.

My form has a has a subform. The combox allows user to select the client and the subform shows the lessons that the client has taken.
 
If the first record is displayed on your form, try the following:

Your combo box will have a bound column (which is usually hidden), it is usually the autonumber field.

In the Form_Load event put

Me.comboboxname = me.AutonumberFieldName

Something like

Me.Combo1 = Me.LessonID

HTH

Dave
 
Last edited:
Yep! that did the trick..thanks bud!.

Another one to store in my memory bank..hehe
 
Last edited:
But if you put it in the Form_Current Event, when you scroll through the records, either with navigation buttons or by using the PgUp & PgDown keys the combo box will follow.

Dave
 

Users who are viewing this thread

Back
Top Bottom