General information
Category:
Coding, syntax & commands
> And all my commandbutton click procedures have:
> thisform.txtName.forecolor=iif(names.gender='DAM',255,iif(names.gender='SIRE',16711680,65535))
> thisform.txtSire.forecolor=iif(sires.chef='N',16711680,65535)
> thisform.txtDam.forecolor=255
> thisform.Refresh
As Arnon said, this is not very efficient. You don't need the above code
in every commandbutton click procedure. It's enough to put each command
from above in the coresponding refresh procedure
(i.e.:this.forecolor=iif(names.gender='DAM',255,iif(names.gender='SIRE',16711680,65535)) in txtName.Refresh and so on).
Because if you want to change such a color, you'll do it in a single
place, not in every commandbutton click procedure
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only