If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
default values in combo box with multiple colimns
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 |
#2
|
|||
|
|||
default values in combo box with multiple colimns
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. -- Build a little, test a little. "mitja" wrote: 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 . |
Thread Tools | |
Display Modes | |
|
|