searching for records base on another record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi,
the problem is, i have a bunch of mandates, and each mandate has lots of
different checks. in order to make the database easier to use, i want to
make a lookup combo box which allow users to search for the required
mandates. As a mandate has lots of checks, i also like to have lookup combo
box which allows the users to search for the checks of the selected mandate.

So in a form, after the user have searched a mandate, the form will show the
information of the mandate and one of the checks; afterwards the user search
for the check of that mandate and the lookup combo box will only show the
checks of that mandate, the form should show the information of the check as
related to the mandate.

i have already created a query to link the mandate and the checks to create
a single form.

how should i arrange the form and what coding do i need? thanks!!

Best regards,
Hackman
 
What you have is a classic One to Many relationship. One Mandate may have 0
to many checks.
This is done with the usual Form/SubForm construct. The Form should be
bound to the Mandate table or a query on the Mandate table. The subform
should be bound to the Checks table.
In this configuration, you set the Link Master Field and Link Child Field
properties of the subform control to relate the two tables. Then when you
change Mandates, you will see only the checks for that mandate in the sub
form. This way you will need only one combo. That would be to look up
Mandates.
 
thnx for your help :)

however, if i want to have a combo box to search for the checks of the
mandate, i.e. i want to have 2 combo box, one to search for a mandate, and
one for searching the checks of the mandate, how can i do that?

Regards,
Hackman
 
Back
Top