multiple openargs

A

atlantis43

Wondering if anyone can give me the correct string to use to open a
report with 2 arguments for openargs. I think I'm just getting
confused with the punctuation.
I'd like a command something like:
DoCmd.OpenReport "InvoiceA", OpenArgs:="Me.[explanation] =
"TxtExplain"|"Me.[lblCopy] =" "" (that is to say NULL).
Thanks in advance, Richard
 
J

John Spencer MVP

DoCmd.OpenReport "InvoiceA",
OpenArgs:="Me.[explanation] =
""TxtExplain""| Me.[lblCopy] is Null"

That will send the following string as the value for openArgs.
Me.[explanation] ="TxtExplain"| Me.[lblCopy] is Null

You can test by copying the argument into the debug window and printing it.

?"Me.[explanation] =""TxtExplain""| Me.[lblCopy] is Null"
Me.[explanation] ="TxtExplain"| Me.[lblCopy] is Null

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top