Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    clrockwell15 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jun 2017
    Posts
    23

    Profile

    Quote Originally Posted by Micron View Post
    So you're not trying to add () around a field name. You're trying to surround the field values.
    If done in the report design I think you'd have to hide the [Wife] control and add a calculated one wherein the controlsource property would be
    ="(" & NameOfWifeControl & ")"



    However, I think the better approach is to calculate (concatenate) in the query behind the report and bind Wife control to the calculated field, which is what WGM is saying (I think). If your report is based on a table, then change it to a query. IMO all forms and reports should be based on queries and not tables anyway. You might want to use IIF to calculate that so you don't end up with () where there is no spouse.

    EDIT - If you set the textbox to 0 height and use CanGrow property, you might be able to avoid a blank line where there is no spouse. Can't recall if that property works in print preview. Or have (no spouse) if there isn't one and you don't want a blank line in any case.

    ALL I WANT TO DO IS SURROUND A FIELD NAME NAMED "[Wife]" WITH PARENTHESES!

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    Quote Originally Posted by clrockwell15 View Post
    ALL I WANT TO DO IS SURROUND A FIELD NAME NAMED "[Wife]" WITH PARENTHESES!
    No need to shout, I have already told you one way, and that has also been offered by Micron?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    And yet you show an example of where the () are wrapped not around a field name but a field value. I don't think you know what you want, but I know what you first asked for.

    What I want to do is add Parentheses around a field name in my access report, e.g., ([Wife]) with [Wife] being the field name.
    Goodbye and good luck.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 7
    Last Post: 10-19-2016, 11:11 AM
  2. Replies: 3
    Last Post: 07-01-2016, 08:11 AM
  3. Replies: 7
    Last Post: 06-18-2014, 08:15 AM
  4. Removing text between parentheses.
    By jwhitley in forum Programming
    Replies: 3
    Last Post: 01-17-2013, 02:37 PM
  5. Replies: 1
    Last Post: 10-29-2012, 03:07 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