Solved

multiple stLinkCriteria

Posted on 2004-09-14
6
609 Views
Last Modified: 2008-03-17
I am trying to open a form using two criteria. It works fine with either one, but I am getting a "type mismatch" when I combine the two. I think I am just combining them wrong. Please help.

Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "product_a"
     
    stLinkCriteria = "[Step3]=" & Me![No] And "[Step2]=" & Me![Yes]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Thanks,
mark
0
Comment
Question by:wesellnow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12059932
Try:

stLinkCriteria = "[Step3]=" & Me![No] & " And [Step2]=" & Me![Yes]
0
 

Author Comment

by:wesellnow
ID: 12060005
Thanks,

Perfect.
I  don't know VB, so I had spent 2 hours on that. I'll be using this site more often.

Mark
0
 
LVL 41

Expert Comment

by:shanesuebsahakarn
ID: 12060026
No problem - don't forget to accept one of my comments as an answer to close this question :)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:wesellnow
ID: 12060226
More to the question.

This worked, but I need to add another criteria. This last one is a currency field. How do I add this? Need to add:
AND [StartingPrice]< 9.99


Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "product_a"
     
    stLinkCriteria = "[Step3]=" & "No" & " And [Step2]=" & "Yes"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Thanks,
Mark
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 100 total points
ID: 12060232
stLinkCriteria = "[Step3]=" & "No" & " And [Step2]=" & "Yes AND [StartingPrice]< 9.99"
0
 

Author Comment

by:wesellnow
ID: 12060353
Thanks for the quick responce.

Mark
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question