Reputation: 69
I have a continuous form that has a dependent combo box on it. I have the dependent working individually for each row/record BUT the dependent combo box is blank unless it has focus then it shows the saved data so what I did was placed a text box over the data portion of the combo box and set its control source to the same field as the dependent combo box and required and it worked great BUT unlike a combo box which would show the name it shows the saved data which is a ID number so I guess my question is how can I show the name and not the data?
Thanks!
Upvotes: 0
Views: 444
Reputation: 19367
You'll need to clarify, but if the combobox is bound to a field of the form, and its RowSource
displays two columns - say an ID and Name - then giving the first column a width of 0 will persuade it to display the Name, rather than the ID.
You will also need the Column Count
to be 2 (or more) and the Bound Column
to be 1 (the ID). Then set the Column Widths
to 0cm;2cm (add more values if more than 2 columns).
Added Remove this criteria from your cobmobox's Row Source:
[Forms]![frm_DelayMachineOutputSubform]![cboCategory]
It is not needed. The ActivityID (and the CategoryID) are obtained for each row in the form.
Remove these lines from the Current event as well:
Me.cboActivity.Requery
Me.txtActivity.Requery
again, they are not needed (and cause the flicker). Better yet, just delete this event-code.
Upvotes: 1