Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / April 2004

Tip: Looking for answers? Try searching our database.

Using a Macro to change Query Criteria....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy - 28 Apr 2004 21:33 GMT
Hello,
I have a Query that has selection criteria (Example: Day=5)
Now I want to write a Macro that opens the query in design
view and changes the criteria to a value specified by the
Macro (Example: Change Day=5 to Day=17 or 19 or 31), then
resaves the query.

Any ideas? I and do the OpenQuery command and go into
Design view but have no idea how to get to the Criteria
area. Is there a record Macro command like in Access to
help point me in the right direction?

Thanks in Advance!
Douglas J. Steele - 28 Apr 2004 23:09 GMT
I don't believe this is possible using a macro: you're going to have to use
VBA code.

On the other hand, if you put something like [Enter Day] instead of 5 in
your query, the user will be prompted to input whatever value they want.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)

> Hello,
> I have a Query that has selection criteria (Example: Day=5)
[quoted text clipped - 9 lines]
>
> Thanks in Advance!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.