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!

Pop up form same record

Status
Not open for further replies.

jeremy0028

Technical User
Oct 9, 2005
37
0
0
US
I have a table and form called patient info

All the following fields are in one record

Main form called patient info

Account#(pk)Auto Number
Last Name
First Name
Address
City
State
Zip
Phone

I also i have a command button on main form called primary subscriber info which opens a pop up form called primary subscriber info which has the following

Insured First Name
Insured Last Name
Insured Address
Insured City
Insured State, Insured Zip

How do i tell access when i press the command button to relate form to patient account on main form called patient info

When ever i press command button relates to first record which i dont want

Any Ideas

 
jeremy
You need to add a WHERE clause to the DoCmd statement. Something like the following...

Code:
Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "YourFormName"
    stLinkCriteria = "[RecordID]=" & Me![RecordID]

DoCmd.OpenForm stDocName, , , stLinkCriteria

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top