Solved

where clause when setting dao in access

Posted on 2014-09-25
2
195 Views
Last Modified: 2014-09-25
Can I add a where clause to the following:

Set rstRangeWords = Db.OpenRecordset("tblRangeTemp")



not sure if i can do that directly here or do i have to put in sql?

this holds the value rstRangeMarque.Fields("Marque").Value
0
Comment
Question by:PeterBaileyUk
[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
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40344575
Set rstRangeWords = Db.OpenRecordset("Select * From tblRangeTemp Where <Criteria here >")

or you can use

dim sql as string
sql="Select * From tblRangeTemp Where <Criteria here >"

Set rstRangeWords = Db.OpenRecordset(sql)


.
0
 

Author Closing Comment

by:PeterBaileyUk
ID: 40344602
thank you that was fast
0

Featured Post

Industry Leaders: 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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

726 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