Setting subform properties

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top