Results 1 to 13 of 13
  1. #1
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398

    Text Box within a report

    Using Access 2010, within a report I have a text box. The control source has this line, =[Forms]![frmNewQuote]![VehicleMake] & " " & [Forms]![frmNewQuote]![VehicleModel]



    My problem is it is only printing the first field. If I create 2 text boxes, and seperate the data, that works fine. But I need to only use 1 text box. Thanks in advance for your help!!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    That's odd. Should work, does for me. Can't replicate the issue. Do you want to provide project for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    Here's copy of whats needs. The report is based off the form. I've created a text field which should display year, make, and model.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    The data is in the textbox but some reason wants to wrap onto second line. Expand height of the texbox and will see the model. I re-typed the data in the table. That cleaned something up because then the string displays properly.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    You are good! With what you wrote, I did some testing. If I look at the length of data within that field, it does not match with the number of characters that are visible. If the other characters are line returns, what will remove them?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Options:

    1. retype the data

    2. VBA function - review http://superuser.com/questions/30270...-with-new-line

    The Find and Replace dialog doesn't seem able to handle these non-printing special characters. Nor does the Replace function in an UPDATE query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I import this type info multiple times throughout the day. Looks like I need to do some scrubbing while the data is being imported in. How do I determine what characters are within a field that are not being displayed?

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    How are you doing the import? The import wizard won't deal with this. You just might have to scrub after import.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I receive this data in the form of emails. I might receive 20 emails per day. I need to add some scrubbing when I'm importing. On the data that I have within the DB at this time, I used the replace command within one field, replacing character return with "". It reduced the length within the field data by 1, but their is still 1 character something that is not visible. I ran the same replace command again, but nothing else was removed.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I could not get the Replace dialog to work on return character. How did you do it?

    A return in Access/VBA is really a two-part code:

    1. in Access or VBA can use Chr(13) & Chr(10)

    2. in VBA can also use constant vbCrLf, equivalent of vbCr & vbLf
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I experimented with:
    replace(string,chr(13),"")

    The Len{string) was reduced by 1. But, the Len(string) is still greater by 1 then number of characters that are visisble. I can't figure out what else I should try.

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You did that in an UPDATE query or textbox? The UPDATE worked although did through error message. I used: Replace(Replace([Address],Chr(13),""),Chr(10),"")

    Those are the only non-printing characters I could think would be involved. Never encountered this before and the VBA function is the only possible solution I could find.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #13
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I correctly the situation using VBA. Here are the two lines of code

    strEmail = Replace(strEmail, Chr(13), "")
    strEmail = Replace(strEmail, Chr(10), "")

    For each of the variables, these 2 lines fixed my problem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Convert yes/no to text in Report
    By csland in forum Reports
    Replies: 7
    Last Post: 08-19-2011, 11:18 AM
  2. program a text box in a report!
    By NateHaze in forum Programming
    Replies: 1
    Last Post: 06-07-2011, 05:55 AM
  3. Weird Text on Report
    By j2curtis64 in forum Reports
    Replies: 1
    Last Post: 05-03-2011, 03:16 PM
  4. report text scrolls away when try to C & P
    By noniknonik in forum Access
    Replies: 0
    Last Post: 06-09-2009, 07:04 AM
  5. How to format text in a report
    By Kimelco in forum Access
    Replies: 1
    Last Post: 01-06-2006, 07:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums