p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access (http://p2p.wrox.com/forumdisplay.php?f=18)
-   -   2 LINK CRITERIA (http://p2p.wrox.com/showthread.php?t=45213)

Vision G July 14th, 2006 01:42 AM

2 LINK CRITERIA
 
HI ALL,

I HAVE CREATED A BUTTON TO OPEN A FORM WITH A SPECIFIC CRITERIA, BUT I WANT TO JOIN WITH TWO CRITERIA !
HOW SHOULD I DO IT!

Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "2_ERGA"

    stLinkCriteria = "[LAST NAME]=" & "'" & Me![LN] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

I'D LIKE TO OPEN THE FORM, NOT ONLY WITH LAST NAME, BUT ALSO WITH THE 'FIRST NAME' CAUSE I HAVE RECORDS WITH THE SAME LAST NAME AND DIFFERENT FIRST NAMES!

tHANK YOU

!


echovue July 14th, 2006 10:33 AM

Try somthing like this...

stLinkCriteria = "[LAST NAME]='" & Me![LN] & "' AND [FIRST NAME]='" & Me![FN] & "'"

HTH

Mike

Mike
EchoVue.com


All times are GMT -4. The time now is 01:52 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.