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

How to open a form with a specific record?

Status
Not open for further replies.

gusbrunston

Programmer
Feb 27, 2001
1,234
US
I want to double click on a control in a form called "frmProperties" and open another form "frmOwners", displaying the data from a shared control name: "OwnerLN".

I know about the double click event, and I've made a macro that will close "frmProperties" and open "frmOwners", but "frmOwners" opens displaying the first record in that table.

How do I carry the unique key over from one form to another in order to see the "Owner" information for the "Property" record I just left?

I have searched with keyword, but didn't find anything I could understand.

The first form, "frmProperties" is based on a query, and the second, "frmOwners" is based on a table. Access2000.
Thanks for any help. :) Gus Brunston
An old PICKer
padregus@home.com
 
If you close frmProperties, the value in OwnerLN will not be available to link with OwnerLN in frmOwners so first eliminate the close action in your macro. (You could change it to minimize or in code you could set the visible property)

Next, highlight the openform action and add this to the where condition.

[OwnerLN]=[Forms]![frmProperties]![OwnerLN]

That should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top