Results 1 to 8 of 8
  1. #1
    DKeith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    4

    Question Splitting a single field into multiple report textboxes or multi-line textbox

    I have a single field in a table called "Client Contact", where users enter a semicolon between the name, address, and city state & zip. My reason for this was so we could copy client info with a single copy and paste (like from an email). But, on the final report, it needs to have these three parts split up into different lines, or even different textboxes. I can't find a way to do that.

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479

  3. #3
    DKeith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    4
    Not sure where to use that. Do I insert the formula in the textbox where I want the results, or in vba in the "On Current" or "On Load" event?

    If in the textbox, it's not returning anything.

    If this is in VBA, I'm not sure how the coding would work.

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    You might try using it in the report.
    You want to split the field and show it in several text boxes on the report.
    I would try adding it to each text box on the report.
    Start each with =

    Dale

  5. #5
    DKeith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    4
    When I enter the formula in the text box, it's telling me to enter a parameter value for Split.

    When I enter the formula in the the label, it just shows the formula.

  6. #6
    DKeith is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2013
    Posts
    4
    I'm entering =Split([Client Contact],";",0)

  7. #7
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    try this in the text box. You can not enter functions (code) in a label.
    =Split([Client Contact]
    , ";",X)
    X will return the number of substrings.
    0=1st, 1 = 1st and 2nd
    -1 returns all substrings.
    The extra code is one reason why we do not put more that one bit of data in a field.
    The best practice is to have a field for each bit of data.
    Firstname, lastName.........

    Dale

  8. #8
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Sorry,
    It appears that Split() doe not work in the Row Source as I thought.

    Dale

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

Similar Threads

  1. Replies: 6
    Last Post: 09-10-2012, 07:19 AM
  2. Replies: 2
    Last Post: 08-31-2012, 02:20 PM
  3. Replies: 1
    Last Post: 12-04-2011, 06:33 PM
  4. Replies: 6
    Last Post: 04-07-2011, 12:33 PM
  5. Replies: 0
    Last Post: 11-23-2009, 09:19 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