Combo box / update

  • Thread starter Thread starter Abay
  • Start date Start date
A

Abay

I have a combo box which displays values based on a table's index, namely
"Cname". On a match, other fields on my form are populated. When there is
no match, data from the first record in the table is displayed (which I
don't want). The form layout has the combo field, followed by the Cname
field an and so on.

I would like the data keyed into the combo field (called Search) on a "no
match" situation to be added to the table as a new entry along with the data
from the rest of the fields in the form, or failing that be displayed in the
field "Cname" and then data can be entered into the rest of the form and in
the end create a new record in the table.

Basically I don't want the user to have to re-key the search/Cname field
again after a failed search, which is what happens now.

Ideally I would like to have one field, i.e. the combo box, which on a no
match situation retains the data keyed in to update the "Cname" field.

Hope the above makes sense .. am pretty new to combo boxes.

Any help would be much appreciated.

Abay
 
Check into the "On Not in List" event for the combo box --- in that routine,
you could add code to add the entry into the table...
 
Many thanks .. I will try that out .. abay


Bob Howard said:
Check into the "On Not in List" event for the combo box --- in that routine,
you could add code to add the entry into the table...


there
 
Back
Top