Solved

where clause when setting dao in access

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

747 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

10 Experts available now in Live!

Get 1:1 Help Now