Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conditional Formatting a form? 1

Status
Not open for further replies.

HJessen

Technical User
Dec 18, 2002
39
US
I have a form that produces a datasheet output and covers different types of training that each employee has taken. Each of the training topics has a different grade spread.

i.e.;
Topic Grade Range
Shop Safety 50-41 (Exceptional)
40-31 (Passing)
30-21 (Very Low)
20-0 (Fails)
Vehicle Care 100-90 (Exceptional)
89-70 (Passing)
69-50 (Very Low)
49-0 (Fails)

What I need is a conditional format that looks at the topic and based on the grade from that particular topic changes the background and text color in the field. (The grade field is numeric.)

Basicly I need:
If topic = "Shop Safety" then do
if grade is GT 41 then
background = green
text = black bold
else if grade is LT 19 then
background = red
text = yellow/bold
Else If topic = "Vehicle Care" then do
if grade is GT 89 then
background = green
text = black bold
else if grade is LT 48 then
background = red
text = yellow/bold
END IF

Can anyone help me? I am NOT VBA literate and cannot seem to locate anything that will help me in the texts I have for reference.

THANKS.
H. Jessen
"Now I know more, and I feel dummer"
 
After having taken some time to review Synchronize.mdb I wanted to ask you if it could be tweaked a bit. For example, what I see my user doing is opening the "Laboratory Data: Pre-Study" form and entering the HGB (gm/dl) values w/o needing to have the other ("Registration") form *visibly* open. I printed the code and have made changes to the names of the forms (the lab form is now called "Laboratory Data: Pre-Study" and the field for the patient ID is called "Patient Number"), changed the names where necessary in the tables and in the code where the above names did not previously appear, as well, to comport with the conventions I'm using in my full blown database application. At this point I have modified your application and the question becomes what's required to design Synchronize.mdb to function as I envisage it?
 
Bill Power: As I study your downloaded application it occured to me that you had a sort of one (registratin) to many (laboratory) form relationship in place to demonstrate the workings of the normal range testing and what happens when the upper/lower limits got violated. Don't know that this matters in terms of what I asked about in my last posting, but in the 'real' application there's a one-to-one correspondence between registration and laboratory data forms: 1 registration and 1 laboratory form per patient.
 
Hi uscitizen,

As I pointed out earlier, my postings are demos not solutions. I have demonstrated free of charge an answer to your request to conditionally format a field in one form based on the criteria of a field in another form.

If it's a complete solution that you are after, you will need to employ and pay someone to do it.

I'm honestly not intending to be rude in any way by saying the above. Your question has been answered in this thread.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top