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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Highlighted text boxes in forms

Status
Not open for further replies.

stc

Technical User
Aug 23, 2001
25
GB
Hello,

In my Access 97 database, I have a subform which has two text boxes showing information based on user-input criteria. When the form opens the first text box is highlighted, as though it has been clicked on. All I want is for the form to display the information based on the underlying query. Users should not be able to edit or enter any information. Is there anyway to prevent the text boxes from being highlighted?

Thanks...
 
Under the text box properties in design view, change 'Locked' to Yes. It is under the data tab.
 
You could set the Enabled to No and Locked to Yes for all eligible controls on the form. This will prevent users even from clicking the controls. But at the same time you'll lose the functionality of the associated events...
If you want users to be able to click or double click the controls, just change the tab order of the controls in such a way that first control is a command button or option button, or option group or something like this.
To disable editing, set form's AllowEdits property to No.

HTH,

Dan
[pipe]
 
Thanks for the replies. I actully had set all the Locks and changed the Allow Edits and so on, and it still didn't work. But I was doing it on the form itself, rather than on the individual text boxes. I have done that now, and it works fine. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top