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 ?
If Field data = "Active" display in green
display in red
I can use the code below in any object that moves the record pointer

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

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


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: 5620
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