Solved

where clause when setting dao in access

Posted on 2014-09-25
2
189 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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.
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now