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

Open Form with related Data

Status
Not open for further replies.

bradleyhorn

Technical User
Sep 15, 2004
35
US
Hi All,

I have what seems to be a simple question.

I would like to call a form from another form. The two underlying tables are related by a field called CASENUM (foreign key.) How do I get the opened form to open with the data from the CASENUM in the calling form? I have commited the relationship to the database already.

Bradley
 
You could create a query which has the join in it and use that as the datasource for your other form. Then you could use the command button wizard to create an "open form" button, and choose the option which says "find related data" and go from there.
 
Using DoCmd.OpenForm, you can include a WHERE clause. Something like...

DoCmd.OpenForm "frmName", , , "CaseNum = " & txtCasenum

Randy
 
What data would you bring along from the calling form in this join? Only the foreign key (CASENUM)?

Bradley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top