Results 1 to 5 of 5
  1. #1
    hehrerh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    35

    Post conditional formatting fails at 3 digits+


    I am trying to conditionally format some report fields to show which floor plans will fit, barely fit, barely do not fit, and do not fit on a given lot based on width and depth.

    The rules I have applied function correctly until values meet or exceed 100 - after meeting or eclipsing this value the format seems to default to the format of my second rule: 'Value <= [Lot Width?]', when I would like it to display the dark red format of the fourth and final rule: 'Value > [Lot Width?]+3'.

    All fields are the 'double' data type. [Lot Width?] and [Lot Depth?] are requested via pop-up box when the report opens and are not stored anywhere.

    Thank you - the attached image shows my current formatting rules and the current results.

    Click image for larger version. 

Name:	Untitled-2.png 
Views:	12 
Size:	161.6 KB 
ID:	29156

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    What do you mean when you say "[Lot Width?] and [Lot Depth?] are requested via pop-up box when the report opens and are not stored anywhere." Where are they available?

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    try

    value < (cdbl([lot width?])-3)

    if your lot width is not an integer

    value < (cint([lot width?])-3)

    if it is an integer

    your conditional formatting may be reading it as a text value.

  4. #4
    hehrerh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    35
    This fixed it! Thank you so much! It must be storing the value as text.

    Is there a way to define Lot Width? as a double or integer on the report, so that I don't have to define it on each formatting line?

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    On the report you can format your fields any way you want. You just might get #ERROR messages if you attempt to apply a numeric format to a text field (for example).

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

Similar Threads

  1. Replies: 2
    Last Post: 11-12-2015, 10:46 AM
  2. Replies: 0
    Last Post: 02-25-2015, 08:09 AM
  3. Replies: 5
    Last Post: 10-03-2014, 11:19 AM
  4. Replies: 6
    Last Post: 05-26-2013, 09:10 PM
  5. Conditional Formatting Fails
    By evacol in forum Reports
    Replies: 3
    Last Post: 12-16-2010, 03:42 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