On Continuous Form, set criteria to allow edit of specific records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a lookup table that consists of an ID, a description and Update
indicator fields. I am creating a form (continuous form view) that displays
all three fields. I want to set the form to display all records in the
table, but I only want to be able to edit records where the update_indicator
field is set to yes.
 
you can add code to the form's Current event procedure, as

Me.AllowEdits = (Me!UpdateFieldName = "Yes")

if the update indicator field is a Yes/No (true/false) field, then use

Me.AllowEdits = Me!UpdateFieldName

in either case, substitute the correct name of the update indicator field,
of course. if you don't know how to create an event procedure in a form, see
the "Create a VBA event procedure" instructions at
http://home.att.net/~california.db/instructions.html

hth
 
perfect - THANKS!

tina said:
you can add code to the form's Current event procedure, as

Me.AllowEdits = (Me!UpdateFieldName = "Yes")

if the update indicator field is a Yes/No (true/false) field, then use

Me.AllowEdits = Me!UpdateFieldName

in either case, substitute the correct name of the update indicator field,
of course. if you don't know how to create an event procedure in a form, see
the "Create a VBA event procedure" instructions at
http://home.att.net/~california.db/instructions.html

hth
 
Back
Top