Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2008
    Posts
    114

    Unanswered: Mixing text and fields.. Can it be done?

    Hello..
    Im wondering if it is possible to wrap a [fieldname] with text... like this:

    I, [ClientFirstName] & " " & [ClientLastName] hereby write something cool and interesting.

    But all under 1 control?

    Tracy

  2. #2
    Join Date
    Jan 2008
    Posts
    114
    = [ClientFirstName] & " " & [ClientLastName] & " hereby authorize blah blah blah " & [How to Finish this line?]
    Ok that works.. Any idea how to get text before the first field?

  3. #3
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    If you mean display the value vertically like this:
    [ClientFirstName]
    [ClientLastName]

    then the text box ControlSource property would be:
    =[ClientFirstName] & Chr(13) & Chr(10) & [ClientLastName]

  4. #4
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    OK different scenario.

    = "hereby authorize blah blah blah " & [ClientFirstName] & " " & [ClientLastName] & [How to Finish this line?]

    But I don't really understand what you're after. Could you explain a bit more?

  5. #5
    Join Date
    Jan 2008
    Posts
    114
    Hi..
    Basically.. I want a block of text with fields mixed in.
    Something like:

    Once upon a time there were three [Fieldname1], who had three [Fieldname2]. They met three little [Fieldname1], and had a [Fieldname3]

    Which should then read:

    Once upon a time there were three BEARS, who had three CHAIRS. They met three little PIGS, and had a PARTY.

    I should patent that story.. it's quite good

    Thanks, hope it;s a bit clearer now

    Tracy

  6. #6
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    I think we've covered this in the sense that we can concatonate fixed text and fields as before:

    = "Once upon a time there were three " & [Fieldname1] & ", who had three " & [Fieldname2] & ". They met three little " & [Fieldname1] & ", and had a " & [Fieldname3]

    If you want the field values to appear in capital letters then:
    = "Once upon a time there were three " & UCase([Fieldname1]) & ", who had three " & UCase([Fieldname2]) & ". They met three little " & UCase([Fieldname1]) & ", and had a " & UCase([Fieldname3])

    This will work for text boxes on forms or reports.

    However, if you want the field values to stand out in another way i.e. be a different colour, highlighted with a different background colour, or be bold, italicised, underlined, when the fixed text is not your going have to do more work.

    What are we talking about?

  7. #7
    Join Date
    Jan 2008
    Posts
    114
    That's what I am looking for. Thank you MyNewFlavour.


    However, if you want the field values to stand out in another way i.e. be a different colour, highlighted with a different background colour, or be bold, italicised, underlined, when the fixed text is not your going have to do more work.
    The reason I wanted to do the conscrerated thing is so that it flows, and there are no large gaps between the fieldnames and the text.
    The UCase([Fieldname2]) that you show above is great, but is that only one?

    Is there a way to bold the fields?

    Tracy
    Thanks for your help, much appreciated

  8. #8
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    Unfortunately not when you concatonate text and fields in a single text box.

    You'd have to create your own control if you want this in forms and reports which doesn't bear thinking about.

    There are work arounds just for forms, but they're ugly and require heavy duty coding. Probably the most practical display on a form would be the RichText ActiveX control - see RichText

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •