Access 2000: Control Button to run a Query

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

bigceedee

Thread Starter
Joined
Sep 10, 2004
Messages
36
Folks,
I think this is an easy one, so easy I can't figure it out.. I know we can work through the wizard to create command buttons that open forms, what about command buttons that open/run queries? I know the code can be placed in the on click command line, but what would my VBA look like? The name of the query I want to run is called:

Cost_Center_Lookup

Any help would be appreciated.
Thanks
CD
 

OBP

Joined
Mar 8, 2005
Messages
19,896
CD, yes when you use the Wizard you have the option of running queries and reports.
It looks like this
DoCmd.OpenQuery "Moves_Crosstab 2 Query"
 

bigceedee

Thread Starter
Joined
Sep 10, 2004
Messages
36
ODP,
I am sure that was the easiest question you have had all year.. I feel ashamed of myself! Thanks for the assist again!
CD
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top