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

Locking the text on an Microsoft 2.0 Textbox

Status
Not open for further replies.

mrdod

Technical User
Jun 12, 2006
103
US
I have an unbound microsoft 2.0 textbox (because it displays scrollbars without needing the focus) and was wondering if there was a way to only allow the user to view the text and not be able to change its contents. "Sort of like a label with a scroll bar (I don't know how to do that either). Any help would be great!!
Thanks.
 
Locked only means you can't update the table using a bound control. My textbox is unbound. I wanted to have it so the user couldn't click in the box and "jack around" with the text.
 
Well, in ACC2000 and ACC2003, I inserted an MS Forms 2.0 Textbox, gave it some text thru its Control Dource (which is what I assume you've done) and set its Locked Property to YES, and it won't allow me to "jack around" with the text. Whether the control is bound or unbound doesn't matter, Locked refers to the control on a form, not the field in a table.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Hmmm I am populating my textbox through a Dlookup function and when I lock the control I can still mess with the text. Perhaps because of the way I'm populating the text box. I guess it's not that big of a deal but it would be a plus if this could happen. Thanks for the time.

 
That's correct, you can programatically enter data into a locked control! It physically "locks" the user out, but not Access, which can be useful at times! The same holds true, BTW, for Disabled controls.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Actually, mrdod is correct. If you programatically enter data into the control, it can still be changed by the user, regardless of the condition of the locked property.

I don't have the solution to his dilemma.


Randy
 
Actually, mrdod is correct. If you programatically enter data into the control, it can still be changed by the user, regardless of the condition of the locked property."

I think this is may be a version/service pack issue.

In my current setup, ACC2003 with SP2, if the control is locked, it won't allow the user to do anything to the data, either before or after the control is populated programatically. I had the niggling idea in the back of my mind that when I used ACC2000 regularly, if you locked a control it couldn't be directly by the user UNLESS you filled the control programatically, after which it became "unlocked." Because of this memory, I checked this out prior my last post, using ACC2993/SP2, and as I indicated, no longer found this to be true. Unfortunately, I just this afternoon placed my PC with the ACC2000 version on board in "mothballs" and have no access to it. As I recall, with the 2000 version, not only did filling it programatically "unlock" the control, but you couldn't programatically "relock" it! You had to exit the form and reload it to return the controll to the locked state.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top