I know that a field's foreground color can be changed in the OnFormat() section.... how about setting the text color of a label dynamically in code? I would like to read a table of user specified "mandatory fields" and change the label color of those fields on a form to indicate to the user that they are "mandatory". (I've gone through the pain of attempting to actually 'enforce' mandatory fields but without great success and will probably default to having a report that a manager can run to identify records with missing mandatory fields.).
Thanks!
Keaton
Comments
so what is the solution, if needed:
1. more labels with other colors and you set the visibility like
2. you doesn't use labels, u use textboxes instead. So you can change th color ;-)
regards
example/
DescriptionOK (Text is Black)
DescriptionNOT (Text is Red)
Lay them on top of each other then show one or the other depending on your reasons. Say you don't want the desription field to be blank in an item.
Untested in real world tho I know This works _ i'm not sure if the colors change instantly with the change of the field or moving to the next record and back. Perhaps a currform.update; is needed somewhere.
Anyway getting back to the original problem of mandatory fields.
You could set the initvalue to some default value and change the not blank proprty to yes. So at least they are filled in with something and it can't be removed only changed.
Another would be on the table (we'll use item for example)
OnInsert() so a new item/customer/vendor would default to blocked right off the bat.
Then on the validate trigger of the Blocked field you could
Testfield the fields you don't want blank. If any of them are then it will error out and the blocked check will remain. The checkmark will only clear once all the testfields clear. Therefore preventing any item/customer/vendor from being used in any transactions beacuse they are blocked.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Here's an old doc with related info
http://www.geocities.com/navision_attai ... uttons.doc
http://www.BiloBeauty.com
http://www.autismspeaks.org