Unbound controls and AllowEdits = False

G

Guest

I want to set AllowEdits to False based on the content of a particular field
in Form_Current. However, I still want to allow the user to navigate to any
record by using a combo box (I call it Selector) that shows sufficient
information for the user to intuitively pick the desired record. I have the
navigation buttons turned off.

The problem is that when AllowEdits = False, then even edits of UNBOUND
controls is denied. I want to simply deny editing of BOUND controls. I am
trying to avoid having to disable all the controls on the form except the
Selector when I really just want to avoid changes to the underlying record
source.

Is there another methodology that will accomplish the underlying task?
 
A

Alex Dybenko

you can lock controls you need using locked property. for example you can
set tag to all controls you plan to lock to "Locked", then loop through all
controls of a form, if tag="locked" - then lock control
 
G

Guest

I am currently using enabled instead of locked, but with basically the same
result.
However, I have an increasingly complex form with over 30 controls. It is so
complex that I had to put it on the Form_Timer and check every 1/4 second to
ensure that the appropriate controls are enabled/disabled based on the
content of various bound & unbound controls. The code is already several
pages long to cover the logic necessary to enable/disable these controls
under specific circumstances.

In this case, however, I just want a simple way to deny changes to the
entire underlying record source. Is there a way to make the record read-only,
which would allow the user to change unbound controls but not bound controls?

Will Snapshot instead of Dynaset accomplish this? That is my next attempt.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top