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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBA in Access...

Status
Not open for further replies.

Groves22

Technical User
Jan 29, 2009
102
US
Hello...
I am very new to Access VBA, VERY NEW. I do well with Excel so I have a little background, but Access is a different monster!

I have 15-20 queries that I would like to auto run with a press of a button.

I have (just a partial testing code):
Code:
Sub Run_Queries()

    DoCmd.OpenQuery "01_PIF Counts"
    DoCmd.Save acQuery, "01_PIF Counts"
    DoCmd.Close acQuery, "01_PIF Counts"
    
End Sub

First... is this right?
Second, I would like to create an easy end user button to run the module... is that possible in Access?

Thanks!
 
I just made a form that runs the queries... Can I auto import tables upon opening access?
 
You may have a startup form that runs some code.
You may also have an Autoexec macro.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hey PHV...

Building Macros and Forms isn't as bad as I thought. I was able to use Macros and Forms to do everything I needed!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top