Source language: Translate to:

Changing colours of a field based on data

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Changing colours of a field based on data

Postby MAD » Wed Feb 06, 2008 6:03 pm

I have a field in a table it is a text field and contains either "Active" or "Suspend". How can I Change the colour it displays on the form based on the data the field contains ?
EG.
If Field data = "Active" display in green
Otherwise
display in red
endif
I can use the code below in any object that moves the record pointer

If "[monbill.Assets.Active]" "=" "Active"
SetObjectLine "TextEntry20" "Red" "None" "0"
EndIf


But is their a better way
maybe a record pointer move/change event I dont know about ??

Thanks
MAD
MAD
 

Postby Neosoft Support » Thu Feb 07, 2008 10:47 am

The dbpOpenTable action includes an optional OnChange Subroutine parameter. The subroutine specified here will be automatically executed whenever the table is updated or the current record number changes. You can place your color change code here.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 2 guests

cron