Question about OpenArgs

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

Afrosheen via AccessMonster.com

I have a form letter where when printed will display the OpenArgs statement.
Like this:

Joe was {OpenArgs} today.

Now the problem is that OpenAgs is a variable length, so when it is printed
it may look like this:
Joe was OpenArgs today. Instead of Joe was here today. The before
and after OpenArgs are label boxes.

What I'd like to do if possible is to take out any extra space within the
OpenArgs and the after label.

Can this be done?

Thanks for your help.
 
J

John Spencer MVP

Use a control with a control source like
="Joe was " & Me.OpenArgs & " today"

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

Afrosheen via AccessMonster.com

Thanks again for the reply. John's suggestion works perfectly..


Use a control with a control source like
="Joe was " & Me.OpenArgs & " today"

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
I have a form letter where when printed will display the OpenArgs statement.
Like this:
[quoted text clipped - 12 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

John if your still there. For some reason the OpenArgs is not working. Maybe
its a bad computer day or something. Yesterday it worked fine.

I even cut and pasted yours in a Text box Here is what I have in it
="See below the names of your employees " & Me.OpenArgs & " that are due to
personnel"

When the program is started it keeps on asking for the Parameters.
Thanks again for the reply. John's suggestion works perfectly..
Use a control with a control source like
="Joe was " & Me.OpenArgs & " today"
[quoted text clipped - 9 lines]
 
J

John Spencer MVP

Try
="Joe was " & [OpenArgs] & " today"

If that does not work then try using some VBA code in the relevant section's
format event.

Leave the textbox source blank.

In the VBA code
Me.SomeTextBox = "Joe was " & Me.OpenArgs & " today"

Of course, this requires that you are working in a version that has an
openArgs property for reports

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
John if your still there. For some reason the OpenArgs is not working. Maybe
its a bad computer day or something. Yesterday it worked fine.

I even cut and pasted yours in a Text box Here is what I have in it
="See below the names of your employees " & Me.OpenArgs & " that are due to
personnel"

When the program is started it keeps on asking for the Parameters.
Thanks again for the reply. John's suggestion works perfectly..
Use a control with a control source like
="Joe was " & Me.OpenArgs & " today"
[quoted text clipped - 9 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

Thanks for coming back so fast.
I tried putting in the on open part of the report and the error I got was:
You can't assign a value to this object.

This was the code: Me.text62 = "Joe was " & Me.OpenArgs & " today"

I'm using Access 2003 with SP3.

If I can get this fixed then it may solve a similar problem I'm having trying
to put code in a text box.
Text54 = "=[lname] & "", "" & [fname] & "" ---- "" & [WorkPlan]"

I get the same error for both. Your's and mine
Try
="Joe was " & [OpenArgs] & " today"

If that does not work then try using some VBA code in the relevant section's
format event.

Leave the textbox source blank.

In the VBA code
Me.SomeTextBox = "Joe was " & Me.OpenArgs & " today"

Of course, this requires that you are working in a version that has an
openArgs property for reports

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
John if your still there. For some reason the OpenArgs is not working. Maybe
its a bad computer day or something. Yesterday it worked fine.
[quoted text clipped - 11 lines]
[quoted text clipped - 9 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

I'm sorry John. For some unknown reason it started working again. Don't know
why.

Thanks again for your help. I wish you really knew how much I appreciate it.
Even if i do ask the dumb questions.
Thanks for coming back so fast.
I tried putting in the on open part of the report and the error I got was:
You can't assign a value to this object.

This was the code: Me.text62 = "Joe was " & Me.OpenArgs & " today"

I'm using Access 2003 with SP3.

If I can get this fixed then it may solve a similar problem I'm having trying
to put code in a text box.
Text54 = "=[lname] & "", "" & [fname] & "" ---- "" & [WorkPlan]"

I get the same error for both. Your's and mine
Try
="Joe was " & [OpenArgs] & " today"
[quoted text clipped - 20 lines]
[quoted text clipped - 9 lines]
Thanks for your help.
 
J

John Spencer MVP

You can't put it in the open part of the report, you need to put it in the
format event of section that contains the Text54 control

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Thanks for coming back so fast.
I tried putting in the on open part of the report and the error I got was:
You can't assign a value to this object.

This was the code: Me.text62 = "Joe was " & Me.OpenArgs & " today"

I'm using Access 2003 with SP3.

If I can get this fixed then it may solve a similar problem I'm having trying
to put code in a text box.
Text54 = "=[lname] & "", "" & [fname] & "" ---- "" & [WorkPlan]"

I get the same error for both. Your's and mine
Try
="Joe was " & [OpenArgs] & " today"

If that does not work then try using some VBA code in the relevant section's
format event.

Leave the textbox source blank.

In the VBA code
Me.SomeTextBox = "Joe was " & Me.OpenArgs & " today"

Of course, this requires that you are working in a version that has an
openArgs property for reports

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
John if your still there. For some reason the OpenArgs is not working. Maybe
its a bad computer day or something. Yesterday it worked fine.
[quoted text clipped - 11 lines]
[quoted text clipped - 9 lines]
Thanks for your help.
 

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