Please proofread my syntax

M

Marshall Barton

Odniel said:
Please tell me what is wrong with this line:

=CanShrinkLines([CONTENT 1],Trim([CONTENT 2]),Report!WIDTH,[PRICE 1])


The following Microsoft knowledgebase article told me to create a single
textbox with the abovementioned line as the Control Source if I want to
activate the CanShrink for "CONTENT 2" if "CONTENT 2" has no information:

http://office.microsoft.com/en-us/assistance/HA011494721033.aspx


There is noting wrong with that line, although the use of a
field named WIDTH is suspicious. What error are you
getting?

Are you sure that you copied the function into your module
correctly?
 
G

George Nicholson

Did you copy the CanShrinkLines function from that article into your
database, per its instructions? The line you showed us requires it.
 
O

Odniel

The article example is:

=CanShrinkLines([Name],[Address1],[Address2],
Trim([City]) & (", " + [Region]) & " " & [PostalCode],[Country])

I substituted all the fields with mine. However, I omitted the ampersands
and quotations because I don't want several fields to show on the same line.

When I try to view the report in Print Preview, I get prompted for a
CanShrinkLines parameter.

About the width field... I have a field called WIDTH. When I first inserted
the expression, I left out the "Report!" and Access autocorrected "[WIDTH]"
to "[Width]." So I deleted the entire sentence and recreated it using the
Expression Builder. Clicking on the WIDTH field resulted in "Report!WIDTH."

Do you think I should rename the field to avoid a conflict in Access?

Marshall Barton said:
Odniel said:
Please tell me what is wrong with this line:

=CanShrinkLines([CONTENT 1],Trim([CONTENT 2]),Report!WIDTH,[PRICE 1])


The following Microsoft knowledgebase article told me to create a single
textbox with the abovementioned line as the Control Source if I want to
activate the CanShrink for "CONTENT 2" if "CONTENT 2" has no information:

http://office.microsoft.com/en-us/assistance/HA011494721033.aspx


There is noting wrong with that line, although the use of a
field named WIDTH is suspicious. What error are you
getting?

Are you sure that you copied the function into your module
correctly?
 
O

Odniel

Yes.

I solved this particular issue by clearing out the extra space in each
record under the CONTENT 2 column in the table.

Thanks, though.

George Nicholson said:
Did you copy the CanShrinkLines function from that article into your
database, per its instructions? The line you showed us requires it.

--
George Nicholson

Remove 'Junk' from return address.



Odniel said:
Please tell me what is wrong with this line:

=CanShrinkLines([CONTENT 1],Trim([CONTENT 2]),Report!WIDTH,[PRICE 1])


The following Microsoft knowledgebase article told me to create a single
textbox with the abovementioned line as the Control Source if I want to
activate the CanShrink for "CONTENT 2" if "CONTENT 2" has no information:

http://office.microsoft.com/en-us/assistance/HA011494721033.aspx
 
B

BruceM

Hmm?

Odniel said:
Yes.

I solved this particular issue by clearing out the extra space in each
record under the CONTENT 2 column in the table.

Thanks, though.

George Nicholson said:
Did you copy the CanShrinkLines function from that article into your
database, per its instructions? The line you showed us requires it.

--
George Nicholson

Remove 'Junk' from return address.



Odniel said:
Please tell me what is wrong with this line:

=CanShrinkLines([CONTENT 1],Trim([CONTENT 2]),Report!WIDTH,[PRICE 1])


The following Microsoft knowledgebase article told me to create a
single
textbox with the abovementioned line as the Control Source if I want to
activate the CanShrink for "CONTENT 2" if "CONTENT 2" has no
information:

http://office.microsoft.com/en-us/assistance/HA011494721033.aspx
 
B

BruceM

Hit the send button a little too soon. What do you mean "extra space in
each record under the CONTENT 2 column"? Not sure what you're getting at,
but you may want to look at the Nz function.

BruceM said:
Hmm?

Odniel said:
Yes.

I solved this particular issue by clearing out the extra space in each
record under the CONTENT 2 column in the table.

Thanks, though.

George Nicholson said:
Did you copy the CanShrinkLines function from that article into your
database, per its instructions? The line you showed us requires it.

--
George Nicholson

Remove 'Junk' from return address.



Please tell me what is wrong with this line:

=CanShrinkLines([CONTENT 1],Trim([CONTENT 2]),Report!WIDTH,[PRICE 1])


The following Microsoft knowledgebase article told me to create a
single
textbox with the abovementioned line as the Control Source if I want
to
activate the CanShrink for "CONTENT 2" if "CONTENT 2" has no
information:

http://office.microsoft.com/en-us/assistance/HA011494721033.aspx
 

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