Results 1 to 6 of 6
  1. #1
    stosh59 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    8

    #Name? Conditional Formatting Report

    Full disclosure: I am an Access wannabe. I also know this should be easy, but I'll be danged if I can figure it out.

    I have a report that uses a query, which combines several tables. Within that report I am trying to apply conditional formatting to a field called StatNam. Without the conditional formatting, the results display just fine.

    When I apply the conditional format 'Field Value is equal to'...then enter 'Green' (which is a valid value) the report displays "#Name?".

    I changed the Field Name text box to make sure there was no conflict there, but I get the same result. If I remove the conditional formatting, the report will display the correct value (e.g., 'Green').



    For grins I created a report directly from a table and the conditional formatting for StatNam worked just fine.

    What am I missing? Do I have to do something special for queries? Thank you in advance for your guidance.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    What happens if you use "Green" instead of 'Green'?

  3. #3
    ajetrumpet is offline Banned
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by ConneXionLost View Post
    What happens if you use "Green" instead of 'Green'?
    that's funny. single quotes don't even take in the vb editor via string values. vba is the only language I've seen and work with that disapproves of single quotes as a string indicator.

    btw, I don't use any quotes. type the value in without them.

  4. #4
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Quote Originally Posted by ajetrumpet View Post
    ... btw, I don't use any quotes. type the value in without them.
    That's worth a try as well. There are many instances where Access will recognize a text string and automatically add the double quotes for you. Although, I know there are locations in Excel where, if you use "Green", it will convert it to ""Green"" and then won't work at all! It is Microsoft; which means idiosyncracies are to be expected.

    I don't know for sure, but I think the single quote was "acquired" by Microsoft for use in Access and Excel for purposes other that text strings. Since then, VB has had to adapt.

  5. #5
    stosh59 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    8
    I typed in Green (w/o any quotations) and Access defaulted the double quotes.

    As I said, the conditional formatting works if I create a report directly from a table, but it is giving me a problem using a query. It doesn't make any sense why it should be different (table vs. query), but then again, I just don't know.

  6. #6
    stosh59 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    8
    Well, this even makes less sense: I used the wizard to create the report. One of the options for report style is BLOCK.

    If I use that style, then I wind up having the #Name? problem. However, using any other style...no problems.

    So much for using the report wizard.

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

Similar Threads

  1. Conditional Formatting
    By pkstormy in forum Code Repository
    Replies: 0
    Last Post: 08-30-2010, 09:31 PM
  2. conditional formatting right(..)
    By bbeernaert in forum Access
    Replies: 3
    Last Post: 08-25-2010, 12:33 AM
  3. Conditional formatting in crosstab report
    By squirrelmaster in forum Reports
    Replies: 0
    Last Post: 06-24-2010, 06:31 AM
  4. Conditional formatting in report
    By RickM in forum Access
    Replies: 1
    Last Post: 09-10-2009, 06:21 PM
  5. Conditional formatting
    By ylivne in forum Reports
    Replies: 1
    Last Post: 07-12-2009, 06:18 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
  •  
Tech Forums: Microsoft Office Forums