Backspace - Chr$(8)

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

Guest

I want to backspace on a report if certain conditions are met but all I get
is the "little square box" when I use Chr$(8). I know you have to use
Chr$(13) and Chr$(10) together or you will get the little square box. If
there something you have use with Chr$(8)?

IIf([Forms]![FaxEmployment2]![chkComments]=False,Chr$(8) & Chr$(8))

Thanks for any help. Lamar
 
Lamar said:
I want to backspace on a report if certain conditions are met but all I get
is the "little square box" when I use Chr$(8). I know you have to use
Chr$(13) and Chr$(10) together or you will get the little square box. If
there something you have use with Chr$(8)?

IIf([Forms]![FaxEmployment2]![chkComments]=False,Chr$(8) & Chr$(8))


No. The only control characters that a text box processes
is the new line sequence. You should remove the offending
characters instead of trying to backspace over them. Post
back with more about your circumstances if you need
assistance doing that.
 
I using information from a form to show on a report. [txtComments] is
optional. Sometimes there will be info and sometimes not. I get "blank
space" on my report when [txtComments] is null because I am using Chr$(13) &
Chr$(10). How do I eliminate the blank space within the text box.

=CanShrinkLines("ID: " &
Format([Forms]![FaxEmployment2]![txtID],"@@@-@@-@@@@") & Chr$(13) & Chr$(10)
& Chr$(13) & Chr$(10) & [Forms]![FaxEmployment2]![txtTypeofLetter] & Chr$(13)
& Chr$(10) & Chr$(13) & Chr$(10) & [Forms]![FaxEmployment2]![txtComments] &
Chr$(13) & Chr$(10) & Chr$(13) & Chr$(10) &
[Forms]![FaxEmployment2]![txtBillType])

Thanks for any help. Lamar

Marshall Barton said:
Lamar said:
I want to backspace on a report if certain conditions are met but all I get
is the "little square box" when I use Chr$(8). I know you have to use
Chr$(13) and Chr$(10) together or you will get the little square box. If
there something you have use with Chr$(8)?

IIf([Forms]![FaxEmployment2]![chkComments]=False,Chr$(8) & Chr$(8))


No. The only control characters that a text box processes
is the new line sequence. You should remove the offending
characters instead of trying to backspace over them. Post
back with more about your circumstances if you need
assistance doing that.
 
The neat way of dealing with this is to judiciously use +
for concatenating to possible null terms. The difference is
that + propogates Null while & does not.

=... & ( [Forms]![FaxEmployment2]![txtComments] + Chr$(13) +
Chr$(10) + Chr$(13) + Chr$(10) ) & ...

If you object to the obscurity of using + then use:

.... & IIf([Forms]![FaxEmployment2]![txtComments] Is Null,
"", [Forms]![FaxEmployment2]![txtComments] + Chr$(13) +
Chr$(10) + Chr$(13) + Chr$(10)) & ...
--
Marsh
MVP [MS Access]

I using information from a form to show on a report. [txtComments] is
optional. Sometimes there will be info and sometimes not. I get "blank
space" on my report when [txtComments] is null because I am using Chr$(13) &
Chr$(10). How do I eliminate the blank space within the text box.

=CanShrinkLines("ID: " &
Format([Forms]![FaxEmployment2]![txtID],"@@@-@@-@@@@") & Chr$(13) & Chr$(10)
& Chr$(13) & Chr$(10) & [Forms]![FaxEmployment2]![txtTypeofLetter] & Chr$(13)
& Chr$(10) & Chr$(13) & Chr$(10) & [Forms]![FaxEmployment2]![txtComments] &
Chr$(13) & Chr$(10) & Chr$(13) & Chr$(10) &
[Forms]![FaxEmployment2]![txtBillType])


Marshall Barton said:
Lamar said:
I want to backspace on a report if certain conditions are met but all I get
is the "little square box" when I use Chr$(8). I know you have to use
Chr$(13) and Chr$(10) together or you will get the little square box. If
there something you have use with Chr$(8)?

IIf([Forms]![FaxEmployment2]![chkComments]=False,Chr$(8) & Chr$(8))


No. The only control characters that a text box processes
is the new line sequence. You should remove the offending
characters instead of trying to backspace over them. Post
back with more about your circumstances if you need
assistance doing that.
 

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