Prompt when trying to close a form in Access 2007

E

Eric Heinold

I have a form that includes a subform which gets filtered. Every time I
close the main form in Access 2007, I get a prompt about saving the subform.
This is when closing the form using a command button that tells it not to
save. The main form doesn't try to save, but the subform does.

Is there any way to tell the form not to prompt about saving the subform?

The code for the command button is this:

DoCmd.Close acForm, Me.Name, acSaveNo

Thanks,

Eric
 
S

strive4peace

Hi Eric,

I am assuming that your 'subform' is actually a query, not a true
subFORM ... put the query in a form and make that the SourceObject of a
subform control

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
E

Eric Heinold

No, actually the sub form is a real sub form. It's actually asking about
changes to the design of the subform -when the sub form is opened, the
recordsource changes depending on options selected. When when we close the
main form, Access 2007 prompts the user if they want to save or not. It
doesn't cause a problem per se, becuase the correct record source is always
assigned when the form is opened, no matter what it was when it was saved,
but the prompt is annoying and looks unprofessional, so i would like to
remove it.

In any version prior to Access 2007, it works fine, we don't get a prompt at
all.
 
S

strive4peace

Hi Eric,

the only time I have seen this happen is if the SourceObject for the
subform is a query, not a form ... check the SourceObject property of
the subform control


Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 

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