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

write-protect and greying out box...

Status
Not open for further replies.

Dre313

Technical User
Jun 4, 2003
219
US
Hi, I have a form where users enters/retrieves records.. each record is assigned a unique number ..

when user enters data in.. on my form I have a field that shows the user the unique number for that record.. what i want to know is.. is there a way to keep the user out of that field.. I want for the user to be able to see that unique number for that record.. but i want to keep them out of it.. meaning.. no edits.. and not being able to put mouse cursor on it.. just to see that number.. greyed out if possible..

thanks
 
Try this:
Set the initial state of the control to locked then
When ever you have to change it's value programatically:
currentvalue = control.locked
Control.locked = false
control.setfocus
control.text = (something)
control.locked = currentvalue
The control stays locked(uneditable) till you need to make a change to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top