Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS ACCESS & have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for

Running Queries Using A Macro


Can I use a macro to run multiple queries in sequence?

I searched on this but did not see anything that indicated how to do this.

Any pointers would be appreciated!



View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
Is There A Way To Know What Queries In A Macro Are Running?
I've got a Macro that runs well over 100 queries as well as sub-macros. I'd like to know what query the Macro is running. My best solution so far was to create a bunch of forms that open and close with the name of each query, but that's kind of sloppy. I don't think I can use the msgbox because it prompts me to press 'OK' to continue. Any thoughts?

View Replies !   View Related
Running Queries

I did 2 ways:

If I created a query named qry1,
then, I created another query (qry2) which include qry1.
Is that meaning running 2 queries?
Firstly, run qry1 result, then run qry2.

Please let me know, thanks.

View Replies !   View Related
Running Macro
Does anybody know how to execute MSAccess macro through an MSExcel command button?

Thanks in advance.

View Replies !   View Related
Running Queries From One Excel File To Another

I need to create some form of query that could reference a data range from one already existing Excel file to then import into another.

The scenario is that every quarter I am delivered a number of financial reports from a Credit Risk database that I use to create a final quarterly report. Currently I have to manually cut data from various parts of these reports to create my final report.

I would ideally want to create some method of extracting this data to then import it into another Excel file that I use to compile the final report Excel document. This document has pre created tables and graphs that are dependant on the imported data from the original reports.

This final report tables, graphs are then formatted and placed into MS Word as a linked MS Excel object, allowing any updates to be reflected in the final MS Word doc. The MS objects are not a issue at this stage, I just added this to complete the scenario.

If any Office guru's could offer some resource or light on how I could achieve this, I'd be happy to hear any comments.

Thanks in advance.


View Replies !   View Related
Queries- Running/Display Results?
Hey guys-
I have a database of properties for sale. I want to calculate the asking prices of each record (for sale) against the sold prices of all the houses in the same area. Area is defined as a numeric number, and each property has one assigned to it. My question is this-
I have a table of all the properties. Do I run the query and store the results in a specific cell in the table- and then use a form to display those results? Or do I run the query from a form and not store the calculated results at all? I will be adding/updating info on a daily basis, so these calculation results will also change daily. Obviously I am fairly new to Access and trying to figure out how to do this stuff. Using Access 2002. Either way, I assume i'll be using a form to display the results one way or another...

View Replies !   View Related
Running Queries With Multiple Criteria
I need to run a query using a list of unique values. I open a new query in design view, pick my table that I want to use, pick the field, but then in Criteria, I need to use a list of values. The list is 62 values long. Any help here would be greatly appreciated. I hope I am explaining myself thoroughly.

View Replies !   View Related
Running Queries In Access 2003
Not sure what happens.

occassionally i will run queries that have run before,
the hourglass will turn on, then turn off, and access does nothing
visible, but tack manager says its running 90% cpu. . .

any ideas on what is happening or i am doing wrong?



View Replies !   View Related
Running Two Queries From One Inputbox Result!?

I have created the following function in my datebase so that i could specify the date a query works from.

Option Compare Database

Function GetParmValue() As Date

GetParmValue = InputBox("Please enter the date you wish to update!?")

End Function

I have a button on a form that runs the query in question, there is also an identical query that needs to be ran using the same result from the input box but rather than it display the input box twice i wondered if there was a way i could use the result from one of the boxes with both queries!?

Here is the code for the button;

Private Sub bImport5_Click()

DoCmd.SetWarnings False
DoCmd.OpenQuery "Update"
DoCmd.OpenQuery "UpdateFuture"
DoCmd.OpenQuery "MoveFuture"
DoCmd.SetWarnings True
MsgBox "Files have now been updated to the specified date and moved to the Future Dated table!", vbOKOnly, "Update Complete"

End Sub

Any ideas guys?

Many thanks

View Replies !   View Related
Running An Excel Macro From Access
Hi all,

I was hoping that someone could tell me if it is possible to run an Excel macro from an Access database. I am importing 3 Excel worksheets into Access and this macro needs to be run on all 3 evertime that this file is imported by the user (twice a week). If this can be done could someone please tell me how ??

View Replies !   View Related
Macro Running Module Failure
hey there,
i have a macro that has 2 actions:

set warnings to warning on: NO
runCode to Function Name: cmdImport_Click()

where cmdImport_Click() is a Private Sub in a module within the same database.

when i try to run the macro i get an error that stated
"the expression you entered has a function name that MS Access can't find."

but if i open the module called ImportMSExcelFile and set my cursor on the Private Sub cmdImport_Click() and select the green arrow to run the procedure it runs fine.

any suggetions?


View Replies !   View Related
Keeping Focus On Main Form While Queries Are Running
I'm sure there is a simple solution - but everything I have tried hasn't worked.
I have a command button on my main form that opens up a popup form. On the popup form the user makes various selections and clicks on another command button(on the popup form). That button is linked to a macro - that runs several queries.

The problem I am having is when the macro starts to run - the main form is maximized again (so now it doesn't take up the full screen - just a part of the screen) and some of the queries start flashing in front of the form.

I know how to maximize the form once the popup form closes - that's not a problem. I just cant figure out how to keep the focus on the main form and in front of all the queries as they are running.

View Replies !   View Related

Copyright 2005-08, All rights reserved