I have a subform that displays the first field with white background. (I'm assuming it has the focus) How do I get the subform field to display gray until the user actually goes to the subform fields?
set the enabled property of all controls on the sub form to false
in the onenter event of the subform control, put code to enable them, something like
Dim i as Integer
For i = 0 to me.mysubformcontrolname.FORM.Controls.Count - 1
Select Case me.mysubformcontrolname.FORM.Controls(i).ControlType
Case acTextBox
me.mysubformcontrolname.FORM.Controls(i).Enabled = True
end select
Next i
you may need to apply it to different control types, depending on what you have on your sub form
Regards
Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now -
On most of my Data Entry forms I add a textbox specifically for the same reason . . . . I call it [blue]Parking The Cursor[/blue].
I make it the first control in the [blue]Tab Order[/blue], usually put it in the top-left of the [blue]Form Header[/blue], and set the Length & Width to zero. Besides hiding the cursor when you open the form, you now have a place to [blue]Park[/blue] the cursor, any time you choose.
As a matter of appeal, it does look better to have a clean form until you start entering data!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.