This should be easy

marksa

Registered User.
Local time
Today, 06:20
Joined
Apr 2, 2002
Messages
13
I am currently working on a "Training Database" in Access 2000. The database holds 150 "Employees" and the training that they are required to complete and the dates the training expires. What I would like to do is: All training that is prior to today's date would flag in some fashion, i.e. the font changes color or the background changes color for that specific record.

I have tried two things, the first for the "review" record is:

If review < date then
review.backcolor = 255
else
review.backcolor = 16777215
End if

I also tried to create a checkbox that is triggered by the review column.

If review < date then
revout = true
else
revout = false
end if

If revout = true then
label73.backcolor = 255
End if

If revout = false then
label73.backcolor = 16777215
End if

The problem with this is that every record changes to the red or white color. I apologize for being so long winded, but this should be simple and I am completely stumped at how to specify this. The Checkbox system works if you use text and put in ;"inserttexthere" in the format section, but this doesn't really work for this database.

Thanks in advance for your help.
 
Sounds like the problem you're facing is that you're testing for a condition with the first record and then not testing each time the record changes. You should probably put your code in the Form's After Update or On Current event (probably On Current).

See if that helps.

BL
 
I tried both, still have the same problem but different. When I put the code on the form itself instead of the control box, the conditions carry through the entire form only when you are actively in the control box.
 
Are you using Single Form or Continuous Forms? If Single, then it should work, but if Continuous, 'tis beyond what I've done in that area.

BL
 
I'm working with continous, but I have tried to have it work in single and haven't been successful.
 
Access 2000 has Conditional Formatting. Try looking that up in the help files.
 
Conditional Formatting is the way to go - it works perfectly.

Thanks for your help - I was pulling my hair out.
 

Users who are viewing this thread

Back
Top Bottom