Look up data on a form

  • Thread starter Thread starter Lynn
  • Start date Start date
L

Lynn

I have one form that has a combobox which you choose one
of three items. If you choose option 1 you can enter a
code from TblA, if you choose option 2 you can enter a
code from TblB, etc.

I'm having problems getting the data from TblB when I
choose option 2. Any ideas?
 
I think you need to describe in some more details such as the relevant Table
Structure, Form details (RecordSource, Controls) and the ComboBox because I
don't think anyone has enough info to answer your question even though it
sounds simple enough.
 
The database is used to keep track of the
number/names/information of people attending events at our
organization. There are two tables - one with member data
which is linked from another program. It uses a family
code as the key. The second table contains nonmember data
in which the data is entered when, as you guessed, the
attendee is not a member of our organization. It has an
attendee code which is the key.

On the form I have an "attendee type" combo box where you
select either member or nonmember. When a user
choses "member" as the attendee type, ideally they should
tab to the "attendee code" combo box where they can lookup
the family code of the member. When they
choose "nonmember" in the combo box the "attendee code"
combo box should contain the attendee codes of the
nonmembers.

I hope this clarifies my problem. Thanks in advance.
 
You can use the AfterUpdate Event of the first ComboBox to change the
RowSource of the second ComboBox.

Check Access VB Help on AfterUpdate Event / Event Procedure and RowSource.

Is your Form bound or unbound?

If your Form is bound, what is the RecordSource of your Form?

Are you using this Form for viewing only or are you using it for data entry
/ edit? (this is actually the hard part and you haven't given much info.)
 
Back
Top