Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Two Combo Fields in a Multitab Form 1

Status
Not open for further replies.

shirsch

IS-IT--Management
Mar 8, 2005
6
US
My company owns commercial properties. I have created a DB based on a master table call "Property Master Info" This table has all the information about each project.

I have created a Multitab form.
The main form is based on the Property Master Info table.

Each project in the master table has a unique projid field.

I have created a combo box in the main form for the user to select the desired project. The combo box is based on the project_description field in the Master Propert Info table.
This works fine. The tab come up with only tenants and vendor associated with the project selected.

The first tab is tenants on the multitab form.

The form is based on the tenant table which contains all tenants for all projects. The tenants table also contains the projid that the tenant is assocaited with.

What I would like to do is place a combo box on the subform which will allow the user to pull down a list of tenants associated only with the selected project.

When I create the combo in the tenant form I get a list of all the tenants. I would like just the tenants associated with the project selected in the main form.

The same hold true for vendors. I get every vendor in the vendor table.

Due to the size of the form I am using single form view for each tenant and vendor. So I would like the user to be able to select from a pull down the desired tenant or vendor.

Can you tell me how to associate the selection from the combo box in the main form to the combo box in the subform. I have tried all kinds of ways and cannot get it to work.
 
Why not simply link the subforms with the mainform ?
Have a look at LinkMasterFields and LinkChildFields

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I have all the forms link based on the projid. But when I place the combo box in the subform all tenants are listed.
 
And what about adding a WHERE clause to each combo's RowSource, like this:
WHERE projid=[Forms]![yourMainForm]![projid]


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Your suggest of adding the Where statement is working. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top