Problem with Textbox in a Report

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

Hi everyone,
I really hope you can help with this.
I developed a Database in Access 97 and I've converted it
for use in Access 2002 (it's in Access 2000 format I
think).
I've got a textbox on a report that is designed to have
the full address of an individual inserted into it - in
other words it's a multi-line field. I use a function to
populate the textbox so at the end of each line of the
address is 'vbCrLf' to make a carriage-return. This
worked fine in 97 but now, all that appears is the first
line of the address.
I've tested the function in the Immediate Window and it's
doing its job so I assume that textboxes are different
somehow in 2000/2002 (?). Do you know how to overcome
this? I can't seem to find any properties that might
help.

Hope you can help!

Regards,

Lee
 
Lee,

The formula below is an example of a name & address that I
use. The Chr(13) and Chr(10) give you the same as a vbCrLf
and using the "+" instead of the "&" effectively deletes
the +'ed components if the field is null. This removes
leading spaces if there is no title or first name and
removes the blank line if an address line is null.

You will need to substitute your field names and copy this
into the control source of your text box.

=[Title]+" " & [first name]+" " & [last name] & (Chr(13)
+Chr(10)+[address line 1]) & (Chr(13)+Chr(10)+[address
line 2]) & (Chr(13)+Chr(10)+[address line 3]) & (Chr(13)
+Chr(10) & [locality] & " " & [state] & " " & [postcode])


HTH,

Terry
PS this works with 2000 and 2002 data bases.
 
Hi everyone,
I really hope you can help with this.
I developed a Database in Access 97 and I've converted it
for use in Access 2002 (it's in Access 2000 format I
think).
I've got a textbox on a report that is designed to have
the full address of an individual inserted into it - in
other words it's a multi-line field. I use a function to
populate the textbox so at the end of each line of the
address is 'vbCrLf' to make a carriage-return. This
worked fine in 97 but now, all that appears is the first
line of the address.
I've tested the function in the Immediate Window and it's
doing its job so I assume that textboxes are different
somehow in 2000/2002 (?). Do you know how to overcome
this? I can't seem to find any properties that might
help.

Hope you can help!

Regards,

Lee

Did you set the text control's Can Grow property to Yes?
If this is not an address label report, did you also set the detail
section Can Grow to Yes?
 
Thanks for this suggestion Terry. I shall use this
method in future. However, I've now resolved the issue
by deleting the original textbox and creating a new one -
it all works fine now! Very odd!

Kind regards,

Lee
-----Original Message-----
Lee,

The formula below is an example of a name & address that I
use. The Chr(13) and Chr(10) give you the same as a vbCrLf
and using the "+" instead of the "&" effectively deletes
the +'ed components if the field is null. This removes
leading spaces if there is no title or first name and
removes the blank line if an address line is null.

You will need to substitute your field names and copy this
into the control source of your text box.

=[Title]+" " & [first name]+" " & [last name] & (Chr(13)
+Chr(10)+[address line 1]) & (Chr(13)+Chr(10)+[address
line 2]) & (Chr(13)+Chr(10)+[address line 3]) & (Chr(13)
+Chr(10) & [locality] & " " & [state] & " " & [postcode])


HTH,

Terry
PS this works with 2000 and 2002 data bases.
-----Original Message-----
Hi everyone,
I really hope you can help with this.
I developed a Database in Access 97 and I've converted it
for use in Access 2002 (it's in Access 2000 format I
think).
I've got a textbox on a report that is designed to have
the full address of an individual inserted into it - in
other words it's a multi-line field. I use a function to
populate the textbox so at the end of each line of the
address is 'vbCrLf' to make a carriage-return. This
worked fine in 97 but now, all that appears is the first
line of the address.
I've tested the function in the Immediate Window and it's
doing its job so I assume that textboxes are different
somehow in 2000/2002 (?). Do you know how to overcome
this? I can't seem to find any properties that might
help.

Hope you can help!

Regards,

Lee
.

.
 
Hello Fred,
Thanks for your suggestion - the Detail section of the
report and the textbox were both set to 'can grow' but
the problem is now resolved as I dumped the original
textbox and created a new one which now works fine!! I
really don't know why that is but all is now OK!

Kind regards,

Lee
 
I've just discovered what the problem was!
In the 'Format' property of the textbox I had put '>' to
force all text to uppercase. Having created a new
textbox (without the property) it worked fine; when I set
it again it went pear-shaped! This is obviously not
something that 2000/2002 is happy with. (sigh)

Lee
 
Back
Top