Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateControl And Not Saving The Final Form

Status
Not open for further replies.

rr191

IS-IT--Management
Jun 6, 2002
21
US
I have an Access 97 form that I add label controls to based on data from a query. I open the base form in design mode, use CreateControl() to add the labels and then display the resulting form. When the form is closed, I get a prompt to save changes to the form.

How can I close the form and not save changes and not get a prompt from Access 97?
 
Hi

set the save parameter to false:

Syntax

DoCmd.Close [objecttype, objectname], [save]

so DoCmd.Close acForm,"FormName",acSaveNo

Regards

Ken Reay
Freelance Developer
kenneth.reay@talk21.com
 
Thanks for the help. I've added a button to the form and use it to close without saving the design changes. The only problem is that it seems to work sometimes and not other -- I get an error that the expression cannot be evaluated. I guess I must have a problem in my code somewhere.

-- Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top