Form Design

S

Shelley C

Hi everyone,

I have to create a form with 3 combo boxes to filter the information
displayed in the form. What I did is I created a form with those 3 combo
boxes and a subform which displays all the infomation. The user is going to
make selection from the combo box
and the relevant information will be displayed in the subform.

My question is how I can display the first record in the combo box as
default when the form opens.

Any help will be highly appreciated!

Thanks!
 
D

Dennis

In the form Open event put this code

[ComboBoxName] = [ComboBoxName].ItemData(0)
 
G

George Nicholson

Something like the following in the Form_Open event would preselect the 1st
item in a combo named cboScenario:

Me.cboScenario = Me.cboScenario.ItemData(0)

HTH,
 
S

Shelley C

Thanks Dennis for your quick reply.

It works!

Thanks again for your help!
--
Shelley


Dennis said:
In the form Open event put this code

[ComboBoxName] = [ComboBoxName].ItemData(0)
Shelley C said:
Hi everyone,

I have to create a form with 3 combo boxes to filter the information
displayed in the form. What I did is I created a form with those 3 combo
boxes and a subform which displays all the infomation. The user is going to
make selection from the combo box
and the relevant information will be displayed in the subform.

My question is how I can display the first record in the combo box as
default when the form opens.

Any help will be highly appreciated!

Thanks!
 
S

Shelley C

Thanks George!

It works !
--
Shelley


George Nicholson said:
Something like the following in the Form_Open event would preselect the 1st
item in a combo named cboScenario:

Me.cboScenario = Me.cboScenario.ItemData(0)

HTH,
 
Top