Combobox Auto Select

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?
 
S

Steve Schapel

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
 
D

Dale Fye

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
 

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