Combobox Auto Select

  • Thread starter Thread starter Lorraine
  • Start date Start date
L

Lorraine

I have a data entry form called ID_tags_Entry_Form. It
has a text box where a numerical ID_tag_number is entered
and then a combobox with 5 selections as to the
type_of_ID_tag.
I have the ID_tags_Entry_Form.type_of_ID_tag combobox
coded so that one of five other data entry forms opens
depending on which type is selected. The first object to
get the focus in all 5 of the other forms is a combobox
that has a list of all the ID_tags that have ever been
entered from using the First entry form
(ID_tags_Entry_Form). At present, you need to search for
the id_tag you just entered in the first form from drop
down list.
My question is this, is there any way I can have the
id_tag_number that was entered in the
ID_tags_Entry_Form.ID_tag_number text box be automatically
selected in the comboboxes when the other forms open?
 
Lorraine,

In the code on the type_of_ID_tag combobox, after the line that opens
the secondary form, put code like this...
Forms!NameOfSecondaryForm!NameOfCombobox = Me.ID_tag_number
 
Lorraine,

Steve's suggestion will work, unless you open the secondary form in dialog
mode. If you do that, then you will need to put the code in the Open event
of the secondary form. something like:

me.cbo_id_Tag_Number = Forms!firstForm.txt_id_tag_number

When does this ID_Tag_Number get written to the database? What if someone
enters a number that was not previously assigned to the type_of_id_tag combo
box? What are you using for the source of the combo box in the second form?

HTH
Dale
 
Back
Top