Macro to run reports based on query criteria
I've got a bit of a macro problem, I'm looking to create a macro which will input criteria, by which reports can be created. I have a report based on a query which asks for the department code, to return all the access data for the department.
I want to create a macro which will create and print a report for each of the departments, by automatically entering the department codes.
Any ideas? Any more detail needed
Thank you for taking the time to report an issue.
What's wrong... Please write below.
Do I need to show more, or can anyone tell what is going on here? All five reports have their own separate record source.
I have a feeling I might have to explain more
I have not seen a way to use the Like function and the Date() in the same criteria. Normally not an issue to change it, but it has became evident that we need to run this query very late in the evening, and I need a macro to set the Windows schedule to run it. So need a way to either get the query to only pull today's date, or a macro to change the criteria when it auto launches as scheduled.
A bit of a noob to access, and working with a database that someone else built.
I want to build a macro that will run all 12 reports at once, and all I'll have to do is manually enter the dates one time at the beginning of the macro.
I can not get the date filter at the beginning of the macro to operate successfully - keep getting error message. The Microsoft online help doesn't cut it.
I have also created many secondary queries that get their data from the calculated fields in the main query.
Finally, I have created about a dozen individual reports that are based upon each of these secondary queries.
I have automated the process of running these reports with a macro that executes the "OutputTo" action a dozen times to save each report as an individual Rich Text file. Theproblem I have is that, when I run the macro, it asks me for the [start date] and [end date] a dozen separate times.
Is it possible to modify the macro to prompt the user one time for the start and end dates and then to pass those dates on to each individual report/query? Or do I need to try to do this with a VBA module?
I want to build a macro that will process all approvers, one at a time, and generate reports to the snapshot viewer.
I am pretty new to access and I am not familiar with VB or XML coding. I have the macro built for the first record, but I don't know how to "do until end" type scenario.
Can this be done using the macro actions and not writing code? I am on Access
I have tried setting the criteria field to the current record of the form, setting a variable to the ID field. But the query is not getting the information to compare and the output of thereport is #Type and #Error.
When the macro is run, the query runs and prompts for the information the criteria is looking for.
How do I pass a variable from a form to a query in VBA?
For example, my database has several different craft codes and ideally what I would like to happen is to be able to use that same query to change the craft codes each time, or skill set. As of right now, I have the same query run with different criteria for each query.
It is the same idea for several reports that I will be running for my executives.
I know you can do it based on the combobox selection but that is not what I want. I have the user make a selection from the combobox and store it as a variable under the afterupdate event criteria. Within that same afterupdate event, I want to close the form and run a macro that will allow the user to select a file using the API command dialog box.
I have the command dialog box macro runnig fine and can call it from a button with no problem. Just need to be able to call it from within a combo box.