View Single Post
  #22  
Old February 1st, 2009, 03:16 PM posted to microsoft.public.access.forms,microsoft.public.access.formscoding
Marshall Barton
external usenet poster
 
Posts: 5,361
Default navigating to different records in a read only form

Paul wrote:
Two questions.

1. The expression "ctl.Locked = OnOff" - I haven't seen that before. Is
that a toggle switch that turns the Locked property of a control on and off
each time it executes?

OnOff is an argument of the procedure. You specify True or
False to lock or unlock the controls when you call the
procedure,


2. Using the Tag property to identify which controls should be locked seems
to be a great way to determine which ones are locked if you don't want to
lock all of them. But if you want to lock or unlock all of them at once,
wouldn't it be a valid, and possible simpler, approach to turn the form's
AllowEdits property on or off, as per Dirk's suggestion?


Right, but you have an unbound combo box that you do not
want to lock, so you must do something about that one
control. Like Dirk, I have not used AllowEdits in this
context, so I am unaware of any unexpected idiosyncracies
beyond the usual about AllowEdits having no effect if the
record is already dirty.

--
Marsh
MVP [MS Access]