View Full Version : how to search on a disabled/locked control


arage
08-14-2001, 10:07 AM
how to search on a disabled/locked control
I have a form & used a wizard to install a search feature for it. A very important control on the form would most likely be the first criteria searched but I’ve locked / disabled that control from ever being touched. How I might I search on it?

I was thinking of this, let me know what you think.

My form has 3 tabs, if I created & hid a fourth (hidden) tab I could stick another control onto it that would contain a control that references my locked/disabled control. But then again, can a hidden control be searched?

**
obviously my tentative solution above doesn't work, a hidden control cannot be searched!


[This message has been edited by arage (edited 08-14-2001).]

arage
08-15-2001, 07:45 AM
I did the following code in the click event of my search button, let me know if this is ok as it is essentially giving me the result I want.

Me.txtReferenceNumber.Enabled = True
Me.txtReferenceNumber.Locked = False

DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

Me.txtReferenceNumber.Enabled = False
Me.txtReferenceNumber.Locked = True