Allow Edits

J

Jones

I have an Order form which when completely filled out sets a check box in
the table to "Lock" the Order. In the current event I have the statement:

Me.Allowedits = Not OrderLocked

In rare cases the Order can be edited anyway.

I placed the following statement in the Got Focus event for one of the
fields:

Msgbox Me.Allowedits

When I click the field the Msgbox displays "False" but I can continue to
edit the field. Has anyone had this kind of problem before?

Stan Jones
 
R

Rick Brandt

Jones said:
I have an Order form which when completely filled out sets a check
box in the table to "Lock" the Order. In the current event I have the
statement:
Me.Allowedits = Not OrderLocked

In rare cases the Order can be edited anyway.

I placed the following statement in the Got Focus event for one of the
fields:

Msgbox Me.Allowedits

When I click the field the Msgbox displays "False" but I can continue
to edit the field. Has anyone had this kind of problem before?

Stan Jones

Do you have any code that sets the value of a control? Once you
programmatically change a value then the AllowEdits is overridden.
 
J

Jones

That could very well be. I usually avoid changing data in code unless the
user takes some action. I assume that Me.Allowedits does not change even
though code can change the data. Is there any documentation to this effect.

sjones
 
R

Rick Brandt

Jones said:
That could very well be. I usually avoid changing data in code unless
the user takes some action. I assume that Me.Allowedits does not
change even though code can change the data. Is there any
documentation to this effect.

Don't know about the documentation part. I would have to do some digging. I
did confirm the behavior though. In a test form with AllowEdits set to false I
programmatically set a field value and the AllowEdits property still indicated
False even though I was able to then manaully make changes.
 
J

Jones

Thanks Rick,

That explains some behavior that I wasn't able to track down for some time.

sjones
 
Top