Solved

where clause when setting dao in access

Posted on 2014-09-25
2
200 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

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

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 …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

691 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