Automated Formatting?

mark curtis

Registered User.
Local time
Today, 02:24
Joined
Oct 9, 2000
Messages
457
Dear all,
I have been assigned a task to automate a RAG Flag status for projects. RAG stands for red, amber or green. On my form I have a combo box with red, amber or green as the selection and next to the combo box I have three labels which turn red, amber or green according to the content of the combo box.

The task I have is to build criteria based on values of other fields so that the RAG Flag will automatically change BUT I also need to allow a user to change the RAG Flag even if the values I am checking against are valid.

I have a couple of questions:

1)On which event should I place the validation check?

2)I have about ten criteria to check so should I use an If Then Else Statement or Case?

3)If Case can you give me an example of how to code one?

4)How do I get round the problem of letting a user change the RAG Flag even if all the criteria is fine? Someone said I needed to use two flags for checking?!?

5)Has anyone got any examples of this type of work?

I know I am asking for the world but I really do appreciate any help.

Thanks
Mark
 
Mark,

Here are my thoughts:

1.If you are changing the properties of the label, then you'll need to use the OnCurrent event of the form. This way the properties are evaluated as you go from record to record. You can then call the OnCurrent event after each of your 10 criteria are changed.

2. It depends on how complicated the criteria are. If you are looking at the value of one field and that field could have 10 different answers. You may want to go with the Select Case statement.

3. Example: Say you have a temperature field (TEMP) that you want to evaluate to update a text field (STATE).

Select Case me.Temp
Case <33
me.State = "Ice"
Case 33 to 211
me.State = "Liquid"
Case >211
me.state = "Boiling"
End Select

4. I would think that you would want to have a flag that indicates if you have a manual override. If that flag is checked, you don't do any calculation, but simply set the flag to the value of your combo box. This will prevent people from claiming that your calculations don't work.

Mike
 
Mike,

Thanks for the reply and your thoughts are of much help.

Thanks
Mark
 

Users who are viewing this thread

Back
Top Bottom