Other code has been working just fine, in a macro or through the Builder for
Event Procedures.
I had been trying to use DoCmd.Quit as the last action in an Event
Procedure for a check box OnClick event. The code is:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "Jeep Rental Agreement Report", acViewNormal, "",
"[Guest ID]=[Forms]![Jeep Rental Agreement 2]![Guest ID]", acDialog
DoCmd.Close acReport, "Jeep Rental Agreement Report"
DoCmd.Close acForm, "Jeep Rental Agreement 2"
DoCmd.CloseDatabase
DoCmd.Quit
All of it ran fine except the last. DoCmd.Quit had absolutely no effect;
the database was gone, but Access was left sitting on the screen open to
mischief.
BUT--I have just now found a way around it. Soft of. I took the Quit
out of the procedure above, and instead put it as an Event Procedure for the
Form's OnClose property.
When I re-open the form, I get an error message that Quit is not
available, but Access closes when I need it to close, so I'll live with
cancelling the message (unless you have an idea how I can get rid of it).
Thank you so very much for responding! I know I've been on here an
awful lot lately, but this is the toughest program I've ever tried to
self-teach. Thanks again -