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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

opening different subforms based on a field in the main

Status
Not open for further replies.

kvbljj

MIS
Nov 30, 1999
1
0
0
US
I am developing a database for the hospital. I want a separate subform to open based on whether the member is a nurse, doctor, technician, administrative person, etc. I have data in the tables and in the main form there is a field that states what their profession is. I currently have it set up to show training for each individual but the boss wants it separated by profession.
 
Build a query to populate your subform.<br>
One of the fields in the subform should contain the value of the profession.<br>
In the criteria line of that field you make reference to the control on the main form containing the profession ID<br>
[forms]![formname]![controlname]<br>
By default it will take the value for this control<br>
In the properties dialog box for the subform set the source to the subform's name. The child link should be the name of the field in the query used to build the subform. The master link is the name of the control on the main form containing the same data as the child link.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top