Report error - Trim

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My label reports suddenly aren't working!
When I open them, the error message "Enter Parameter Value - Trim" appears.
When I press OK, my two lines that only have one field show up fine, but my
other two lines with multiple fields come up as errors - even though they
worked fine before!

I tried to correct this by writing my own VBA and came up with this:
Trim = [Title] & " " & [NameP] & " " & [NameL]
but there's an error for this too:
"Syntax error in query expression '[Trim = [Title] & " " & [NameP] & " " &
[NameL]]"

Even when I create new label reports with the wizard I get the same problem.

Please help!!!!
 
What did you have before? And where are you trying to remove leading
spaces? See below from chart in Help section...

Expression Description
=Trim(" A ") Removes all leading and trailing spaces, and returns "A".
=LTrim(" A ") Removes all leading spaces, and returns "A ".
=RTrim(" A ") Removes all trailing spaces, and returns " A".


Try: FullName: Trim([Title] & " " & [NameP] & " " & [NameL])
 
The trim command automatically came up because I used the label wizard.
There will be some leading spaces because not all contacts have a title, so
I guess that would be the second option.


Gina Whipp said:
What did you have before? And where are you trying to remove leading
spaces? See below from chart in Help section...

Expression Description
=Trim(" A ") Removes all leading and trailing spaces, and returns "A".
=LTrim(" A ") Removes all leading spaces, and returns "A ".
=RTrim(" A ") Removes all trailing spaces, and returns " A".


Try: FullName: Trim([Title] & " " & [NameP] & " " & [NameL])

Kat said:
My label reports suddenly aren't working!
When I open them, the error message "Enter Parameter Value - Trim"
appears.
When I press OK, my two lines that only have one field show up fine, but
my
other two lines with multiple fields come up as errors - even though they
worked fine before!

I tried to correct this by writing my own VBA and came up with this:
Trim = [Title] & " " & [NameP] & " " & [NameL]
but there's an error for this too:
"Syntax error in query expression '[Trim = [Title] & " " & [NameP] & " " &
[NameL]]"

Even when I create new label reports with the wizard I get the same
problem.

Please help!!!!
 
Bill,

You cannot use Trim as variable name. The correct syntax is:

YourVar=Trim([Title] & " " & [NameP] & " " & [NameL])

Regards/JK

Bill-McG said:
Kat - Did you ever figure this out? I just got the same problem from a
report I created in Access 2002 then tried to run from a PC running Access
2003... it errors with Trim looking for a parameter ( also, Mid in another
field is asking for a parameter). Thanks

Kat said:
My label reports suddenly aren't working!
When I open them, the error message "Enter Parameter Value - Trim"
appears.
When I press OK, my two lines that only have one field show up fine, but
my
other two lines with multiple fields come up as errors - even though they
worked fine before!

I tried to correct this by writing my own VBA and came up with this:
Trim = [Title] & " " & [NameP] & " " & [NameL]
but there's an error for this too:
"Syntax error in query expression '[Trim = [Title] & " " & [NameP] & " "
&
[NameL]]"

Even when I create new label reports with the wizard I get the same
problem.

Please 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

Back
Top