Report Formating

bullfrog

New member
Local time
Tomorrow, 07:24
Joined
Jan 23, 2005
Messages
5
I am doing a database for a school and in the report i need the text boxes background colour to change depending on one of the two values (1 and 0) how do i do this i have to have this done in 24 hrs so any help would be appreciated


Bullfrog
ant.boyd@gmail.com
 
You will need to write a little bit of VBA for this, in the report detail (or whatever section your text box is in) write the following.

If me.textboxname.value = "value" then
me.textboxname.backcolor = 255 (255 = red)
elseIf me.textboxname.value = "value2" then
me.textboxname.backcolor = 0 (0 = black)
end if

The easiest way to get the colours is to alter a text box manually and then get the value you need.

Hope this is in time.

Stu
 

Users who are viewing this thread

Back
Top Bottom