Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't reference a property of a control unless control has focus 1

Status
Not open for further replies.

jtamu

MIS
May 16, 2001
3
US
I have an if statement based on the value of a text box in a field on the current form. The statements are in the Form Open and the Form Current events. How do I reference the control's text value without first having to set focus to it. The form is larger than the screen and I don't want it to have to jump to the top field every time a new record is scrolled to.
 
Just to grab the information from a text control:

NameofControl.value

This will pull the current value from here for use, but if your opening a new record then this is likely to be blank unless it has a default value.

or is this outside the Detail section and within the Form header?

Hope this is what you needed

Ian
 
If you trying to use the '.text' property, you can't access it unless the control has the focus, but you can access the .value property.

If this doesn't help, we will need more information as to what you are doing.

GComyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top