Subform saves automatically when I close the parent form

A

Angus

Hi
first, sorry for my not-so-good english.

I have a form with a subform (1-to-many relationship, all record displays
fine). When I close the main form I notice that the subform gets saved (the
modification time gets updated). This is no good for me, because I use VBA to
change some of the subform properties (such as AllowEdits, etc.) while it is
opened, but don't want to keep them: the next time I open the form I would
find the original settings (not modified by VBA).
I finally noticed that the problem depends on the "sort by" property of the
subform: if it is set to a (any) field, the problem occurs. If that property
is not set, the problem doesn't happen.
IMHO it is a really strange behaviour, but if anyone knows its meaning (is
it "by design"?), could I be clarified?

Note that:
1. the problem does not appear if I just open and close the form. It appear
if I follow these steps:
a. open the form
b. go to the next record
c. go back to the previous (#1)
d. close the form
2. The problem is not related to the complexity of my db, as I can reproduce
it simply creating a new database, with only 2 tables and 2 forms in it. You
can try by yourself...
3. I use access 2003, fully service-packed & Co. + XP Pro SP3

Thankyou to those who can help me to understand
Andrea
 
B

bcap

A form has an "Allow Design Changes" property which defaults to "All Views".
Try changing this to "Design View Only".
 
A

Angus

Hi bCap, thank you for your answer.
Unfortunately, the "Allow design changes" of both forms is already set to
"design view only", but the problem occurs anyway.

Could anyone have another idea?

a.
 

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