Conditional Formatting on Entry Form (1 Viewer)

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64

:banghead:
I am trying to update a data entry form our lab techs use. I have Min LOA and Max LOA based on a table. On the entry form, the lab techs select the overall base paper, and this fills in the Min and Max LOA values based on the base paper they select. On the form, I am trying to use conditional formatting so that if they are below the minimum it highlights in red bold, and if they are above the maximum it highlights in yellow. However, as you can see, this isn't highlighting correctly. Any idea what I am doing wrong or how I can fix this? I have spent HOURS trying to get this to work correctly. Thank you!
 

Attachments

  • conditional formatting issue.pdf
    67 KB · Views: 41

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
Make sure your values are numeric and not text. Alphabetically, 11 is less than 8.
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
I have the values set as Single, Fixed. Is there something else I should be doing? Thank you for a quick response.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
Single should work. Is there something in the query or report that may be converting the value (Format function, etc)? Can you post the db here?
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
I don't believe so. My database is too large to upload it here. Let me see if I can do something to compress it to share. Thank you again!
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
In looking at the database, I don't see where there are queries or reports that are using that information. I will have to keep looking. Thank you!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
See if the value(s) in the query are left or right aligned. Are the min/max values in the query or are they populated some other way?
 

Minty

AWF VIP
Local time
Today, 03:22
Joined
Jul 26, 2013
Messages
10,380
Are you comparing the field name or the control name. Unusually Conditional formatting refers to the control source name NOT the control.
e.g if you have a text box call txtLevel but the control source is a field called Level Your CF would be Value > [Level]
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
The min and max values are just pulled from a table, and populated in the after update event for the base paper selection drop down menu
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
I tried to refer to the field name. So I have it reference the name of the field that the combo box pulls from to populate the text box. Do I have to have them bound to those text boxes?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
I haven't had a problem referring to a control name myself, but who knows. Your issue really feels like a text/numeric problem. The min/max values are also numeric data types? The values all look centered; try giving all the textboxes a numeric format.
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
I am thinking the same thing, I just can't pinpoint where it is getting confused. Everything is set as a number field, singled, fixed. I tried left aligning the min and max values as well as right aligning them and nothing seems to be working. I agree that it has to be confused with text/numeric values somewhere. Seems like it should be so simple to do. Thank you so much for all your help! I really do appreciate your time and efforts!
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
The other thing I noticed, is my decimal places on the min/max values don't show up on the form itself, but are there in the table they pull from.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
If compacting and zipping doesn't get the db small enough, perhaps you can export the relevant bits to a new db? Or email it?
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
I tried to compact it. I have deleted most of the tables and what not as well. Hopefully you can still get a basic understanding.
 

Attachments

  • 2016 Facial revised copy for email.accdb
    940 KB · Views: 56

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
Nothing works because of the linked tables. ;)
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
That is my issues, is I have the tables linked to a backend database for security? Or you can't see anything because of the linked tables?
 

Minty

AWF VIP
Local time
Today, 03:22
Joined
Jul 26, 2013
Messages
10,380
Make a copy of some of the linked tables and replace them with a local table with a small subset of the data in the database. Then zip etc.
 

Jul

Registered User.
Local time
Yesterday, 22:22
Joined
May 10, 2006
Messages
64
Here is the database without the linked tables. Sorry about that.
 

Attachments

  • 2016 Facial revised copy for email.accdb
    1.2 MB · Views: 34

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:22
Joined
Aug 30, 2003
Messages
36,138
It seems to be seeing the min/max values as text for some reason. Wrapping them in a conversion function in Conditional Formatting appears to work:

CDbl([txtMinimumWeight])
 

Users who are viewing this thread

Top Bottom