On Enter Color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to change the color of a text box when the user tabs into it.
It's a subform but I can't make it work. I'm using this format:
Forms!Name![Slips Subform].Date1.BackColor = RGB(255, 0, 0)
where 'Name' is the form & 'Slips' is the subform.

Thanks
 
Try the Conditional Formatting option via the Format menu. Use the condition
Field Has Focus. No code necessary. HTH.
I'm trying to change the color of a text box when the user tabs into it.
It's a subform but I can't make it work. I'm using this format:
Forms!Name![Slips Subform].Date1.BackColor = RGB(255, 0, 0)
where 'Name' is the form & 'Slips' is the subform.

Thanks
 
Forms!Name![Slips Subform].Form.Date1.BackColor = RGB(255, 0, 0)

Make sure, too, that the name of the control that holds the subform is
[Slips Subform]. The name of the subform control isn't always the same as
the name of the form being used as a subform. If they're different, you need
to use the name of the subform control.
 
Thank You very much

Douglas J. Steele said:
Forms!Name![Slips Subform].Form.Date1.BackColor = RGB(255, 0, 0)

Make sure, too, that the name of the control that holds the subform is
[Slips Subform]. The name of the subform control isn't always the same as
the name of the form being used as a subform. If they're different, you need
to use the name of the subform control.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


williamr said:
I'm trying to change the color of a text box when the user tabs into it.
It's a subform but I can't make it work. I'm using this format:
Forms!Name![Slips Subform].Date1.BackColor = RGB(255, 0, 0)
where 'Name' is the form & 'Slips' is the subform.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top