openargs question

  • Thread starter atlantis43 via AccessMonster.com
  • Start date
A

atlantis43 via AccessMonster.com

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)
 
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)

I should also mention that Me.explanation is a variable.
 
D

Duane Hookom

I assume you would need to parse the two values from within the report. I
don't know if you want TxtExplain as a string or if it is the name of a text
box. Hard-coded values should be passed inside quotes and values from the
current form context should be outside of the quotes.

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

Perhaps you should provide more context to your question.
 
J

John Spencer MVP

OpenArgs:=Me.[explanation] & " = ""TxtExplain""|" & Me.[lblCopy] & " IS NULL"

Assumes that Me.Explanation and Me.LblCopy are variables and you want to pass
the value of the variable in the argument.


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

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)

I should also mention that Me.explanation is a variable.
 

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

Similar Threads


Top