Disable Controls + subform on a Form but keep one field enabled

  • Thread starter Thread starter Billp
  • Start date Start date
B

Billp

Hi,

Is it possible to disable controls on a form, on current, but allow one
combobox to remain active?
When veiwing customer records it is necessary to have the controls/fields
disabled so that they cannot be changed but have one control, the combo box,
(cboCustomerID) enabled to allow navigation directly to a customer.
The navigation buttons allow choice of a new record so that data can be added.
Can a subform be also disabled along with the main form?
The subform is a continuous form.
 
Thanks Jeannette



Jeanette Cunningham said:
Hi Billp,
You can set allow edits to No for the form.
On the enter event for the cboCustomerID, put code to set allow edits to
yes, so user can choose a customer.
On the exit event for the combo, set allow edits back to no.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Dale,
I have always used toggling the allow edits setting for an unbound combo
used for searching when the form has allow edits set to no.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Dale, you can find examples if you search the discussion groups.
Start with the form has allow edits set to No.
The combo won't work with allow edits set to no.
On the enter event of the combo, put code to set allow edits to yes.
After user makes their choice and the after update event for the combo fires
and user exits the combo, put code to set allow edits to no on the exit
event of the combo.
Now the user has been able to choose from the combo, and when they get to
the rest of the form, they can't edit the data because allow edits is set to
no.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



Dale_Fye via AccessMonster.com said:
Jeanette,

I've been using Access for a long time, but am not familiar with that
technique or property. Can you elaborate?

Dale

Jeanette said:
Dale,
I have always used toggling the allow edits setting for an unbound combo
used for searching when the form has allow edits set to no.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
Personally, I prefer to lock the controls. Found some code on Allen
Browne's
[quoted text clipped - 22 lines]
Can a subform be also disabled along with the main form?
The subform is a continuous form.

--
HTH

Dale Fye

Message posted via AccessMonster.com
 
Back
Top