Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically updating a query (where clause) in VBA

Status
Not open for further replies.

LaCour

MIS
Jul 15, 2004
53
US
I have a report that is based off of a query. I would like to update the where clause so the report changes based on the augmented query. Because I am primarily interested in the report, I don't want the query to open and be viewed. I just want it to returne a different recordset for the report.

Thanks for your help
 
Hi,
[tt]
Sql = "select * from Table where field1='" & vF1 & "' "
set rs1 = Open Sql, db, 1, 2
[/tt]
:)


Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top