Look up data on a form

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

Van T. Dinh

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.
 
L

Lynn

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.
 
V

Van T. Dinh

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.)
 

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