default values in combo box with multiple colimns

M

mitja

Hi,
I have a combo box (cmbSEG_ETY_ID) that is filled with values from a table
SELECT RPT_EMPLOYEE_TYPES.ETY_ID, RPT_EMPLOYEE_TYPES.ETY_NAME FROM
RPT_EMPLOYEE_TYPES; (employee ID and employee NAME), where employee NAME is
visible and employee ID is linked column (column 1).
When a form opens a combo box is empty and a user has to select one product.
I want to change this so when a form opens, combo box would already have a
name of the first product NAME filed in and a product ID somewhere (?)

I tried to set Default value to:
=[cmbSEG_ETY_ID].ItemData(0)
doesn't work

I tried to use the load procedure Private Sub Form_Load():
Me.cmbSEG_ETY_ID.Value = Me.cmbSEG_ETY_ID.ItemData(0)
doesn't work

What to do?
Thanks
Mitja
 
K

KARL DEWEY

Open the form in design view, click on the combo, double click, scroll down,
and select Properties.
Enter an ID value in the Default Value property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top