goingolfn99
asked on
ON CLICK CHANGE THE COLOR FILL OF TEXT BOX
Probably an easy 500 points. When i click my button (cmdAddNew) I would like the color fill of one textbox (txtLocation) to be yellow so the user will know to make sure to fill the area. and then have it back to normal gray color once it is saved since the textbox will go back to its normal setting of enabled = false.
Private Sub cmdAddNew_Click()
txtName = Null
txtPosition = Null
txtLocation = Null
txtID = 0
chkNew = True
'--- enable the text boxes and the Save button
txtID.Enabled = True
txtName.Enabled = True
txtPosition.Enabled = True
txtLocation.Enabled = True
txtName.SetFocus
'--- disable the list box, the Add New button, the Close button, and the Edit button
'--- must be done after the setfocus as we cannot disable something that has focus
lstEmployee.Enabled = False
cmdAddNew.Enabled = False
cmdEdit.Enabled = False
cmdExit.Enabled = True
cmdClear.Enabled = True
cmdSave.Enabled = True
cmddelete.Enabled = False
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was making harder than what I made it out to be. Thanks TWBIT
txtID.BackColor = vbYellow '<<<<<<<<<<<<<<
_______________________
cmdAddNew.Enabled = False
txtID.BackColor = vbWhite '<<<<<<<<<<<<<<