Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215

    Unbound Text

    I have a report that has a text box with just text in it (ex. ="This is an example of the text that I have.") I need to insert a field from a table that into the text above (ex. ="This is an example of the text that I have. If you need help, contact your Rep, [Rep.Name].") I can't get it to enter the Rep's name at all because it is in the string of hard text. What can I do to get to my goal?




    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your ControlSource needs to concatenate the string:
    ="This is an example of the text that I have. If you need help, contact your Rep, " & [Rep.Name] & "."

  3. #3
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    I just tried this and now it is coming back saying I have to enter a parameter value

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    My bad. This: [Rep.Name] should be [Name] and that is a bad choice for the name of a field since it is a reserved word in Access: http://www.allenbrowne.com/AppIssueBadWord.html

  5. #5
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    The name of the field is Last Name in the Table Rep. [Rep.LastName] is how it is showing up in the design view of the report.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    In that case it should be [LastName].

  7. #7
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    I had tried that before. Here is what's going on exactly how it looks in the report.

    I am creating a letter to clients that pulls (added from the existing field list) the clients name, address, etc. for the address bar and dear client lines. There is a client table that has a relationship to the rep table and links it through the reps code. Now in the letter I want the reps name that is associated with that client to be inserted like I asked before. The problem I ran into was that when I went to insert the reps last name & first name from the existing field list, it just inserted the clients last name or first name again. I thought I could avoid that by just typing in the destination, which is why I asked it that way above. Any ideas?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are all of the fields you want in the RecordSource of the Report? Create a control that just displays the name you want and see if that works. If it does then reference that control instead of the field and make the new control invisible.

  9. #9
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    Yes, they are all in my RecordSource. I changed the control source to the field I need and it came back saying that it can't find the field referred to in your expression.

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need to get the control to display that field before you can go any further. When you press the DownArrow on the ControlSource ComboBox in the property sheet for the control, is your field there?

  11. #11
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    Yes it is, along with all the other ones (client name, address...). In there is also all of the hard text that I used as an example in the first post.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The hard text is in the DropDown??? When you just select the field, does it display properly?

  13. #13
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    My mistake, the hard text is not actually in the drop down but when I select the text box that has the hard text in it and look at the ControlSourse the hard text is in that display box (not in the drop menu). It shows ="This is the hard text..."

    The hard text shows up fine in the report view and any other views I look in.

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about the Field without the hard text?

  15. #15
    cbrsix is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    215
    The fields without hard text are working fine and pulling the right date from the right tables and fields. I'm only having a problem getting the Rep names into the string of hard text.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Unbound Text Box Formatting
    By Pam Buckner in forum Forms
    Replies: 2
    Last Post: 10-14-2011, 01:31 PM
  2. Using Unbound text boxes
    By rbiggs in forum Reports
    Replies: 4
    Last Post: 08-16-2011, 04:05 PM
  3. Unbound Text boxes
    By kyleg222 in forum Forms
    Replies: 2
    Last Post: 08-02-2011, 12:53 PM
  4. Unbound Text box in reports
    By Overdive in forum Reports
    Replies: 1
    Last Post: 02-17-2010, 09:52 AM
  5. Unbound text box truncating text
    By gddrew in forum Forms
    Replies: 0
    Last Post: 03-02-2006, 11:26 AM

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