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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculate color

Status
Not open for further replies.

weeze2

Technical User
Jun 18, 2002
129
DK
How can one set the background color of a textbox depending on its calculated value?
I guess I should use something like

if textbox.value = "##" then
texbox.background = 5454565
else
texbox.background = 0

but where can I use this. I have 31 textboxes in the report that must in some way be traversed to determin the color of each. I hope someone has an idea I can work on.
 
IF you are working in A2k or 2k2 then you can use Conditional Formatting.


Click on as many of the controls as you want to affect ( holding the Shift key down at the time ) and then choose Conditional Formatting.. from the Format menu.

Then fill in the dialog box as required.




QED. G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.

Please remember to give helpful posts the stars they deserve!
This makes the post more visible to others in need! :-D

 
Set up an array of the textbox names and reference them via the "name" index.


For Idx = 0 to UBound(txtName)
[tab]tName(Idx)).Backcolor
[tab]Idx = Idx + 1
Next Idx


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top