Setting subform properties

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

Guest

I have 2 forms; one for editing data and another for viewing the same data.
Both forms contain the same subform. I'd like to dynamically set the
ALLOWEDITS etc. properties on the subform based on each main form. How would
I do this?

Thanks.
 
In the main forms' load events, put
Me!yoursubformname.Form.AllowEdits = False 'or true if it is the form for
editing


HTH
Damon
 
mscertified said:
I have 2 forms; one for editing data and another for viewing the same data.
Both forms contain the same subform. I'd like to dynamically set the
ALLOWEDITS etc. properties on the subform based on each main form. How would
I do this?


You will probably be better off placing the code in the
subforms:

Me.AllowEdits = (Parent.Name = "edit form's name")
 
Back
Top