Enabling a combox box on a read only form

  • Thread starter Thread starter AWScobie
  • Start date Start date
A

AWScobie

I have a navigation combo-box on a form.
For certain users I wish to open the form in read only mode.
However if I do this, the navigation combobox is not functional, s
users cannot navigate to view a particular record.
What is the solution ?
Thanks,
Alistai
 
AWScobie said:
I have a navigation combo-box on a form.
For certain users I wish to open the form in read only mode.
However if I do this, the navigation combobox is not functional, so
users cannot navigate to view a particular record.
What is the solution ?
Thanks,
Alistair

Instead of using AllowEdits = No (which locks everything), you can loop through
the controls on your form and set their individual Locked properties to True. I
usually use a string in the TAG property of the controls I want to lock so I can
be more selective and avoid the errors that would be thrown if I tried to set
Locked = True on a control that doesn't have a Locked property.

Dim cnt as Control

For Each cnt in Me
If cnt.Tag = "Lock" Then cnt.Locked = True
Next cnt
 
Back
Top