I created a macro (OpenAllrpts) that opens 7 reports. In the argument section I have listed the name of the report and Print preview.
In the code behind the form the user will use I have docmd.runmacro OpenAllrpts. I'm getting an error that an argument is needed. What do I do?
I think you need to quote the name of the macro, so you would have
- DoCmd.RunMacro "OpenAllrpts"
If you don't do that, the "MacroName" argument (not optional) will not be present, thus returning the error you see.
By the way, are you using the "Option.Explicit" statement at the beginning of the VBA module behind your form? It's always a good idea to have that one, and do a Compilation (Menu "Debug", item "Compile") before trying to run your code.
Just my 2 cents.