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

test multple keys

Status
Not open for further replies.

etcrier

Programmer
Sep 20, 2006
60
US
i have a form with a sub form that calls another form I want to print.
the call requires matching on 2 keys instead of the one key done by the wizard. here is the created code
stDocName = "CHGTICKET"
stLinkCriteria = "[jid]=" & "'" & Me![jid] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

how do i add a test fro a second set of keys. i created a button on 1st form to call second with an exact record match but I have 2 keys in record that need to match

thanks
 
Hi is the data on the form you are trying to open sourced by a query ?
If it is then - in this query -
in the criteria of the fields you are trying to match
you can put form!formName!jid in the column(field) you
are trying to match up to the 'jid' value and the same
for the second fields criteria .

This does mean the query is less dynamic but should cover your issue.

I think this could be an easier method for you at the moment.

jo

hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top