Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2006, 01:42 AM
Authorized User
Points: 250, Level: 4
Points: 250, Level: 4 Points: 250, Level: 4 Points: 250, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: , , Greece.
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default 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

!

 
Old July 14th, 2006, 10:33 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: Clinton, UT, USA.
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Try somthing like this...

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

HTH

Mike

Mike
EchoVue.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Searching Criteria Muhammad Zeeshan SQL Server 2000 1 September 30th, 2007 07:14 AM
AND/OR criteria in a JOIN fizzerchris Access 5 July 18th, 2007 02:37 PM
selection criteria... dbrook007 Other Programming Languages 0 February 21st, 2006 04:41 PM
what is the criteria to get one record yylee Access 1 April 29th, 2004 04:19 PM
Query Criteria Clive Astley Access 4 March 25th, 2004 03:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.