Setting subform properties

M

mscertified

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.
 
D

Damon Heron

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


HTH
Damon
 
M

Marshall Barton

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")
 
Top