No. I add the subform with a line like;
Set ctl = CreateControl(frm.Name, acSubform, acDetail, , "", iLP, iTP, iWP,
iHP)
then I set its source object to an existing form;
ctl.SourceObject = "sfrmSubDisplay"
Then I modify some of the properties for controls on the subform with code
like;
frm.Controls(ctl.Name).Form.Controls("txt1").Width = 250
When complete I close the form with
DoCmd.Close acForm, frm.Name, acSaveYes
At runtime, when this line is processed, the prompt appears asking to save
both the form and subform. If I don't modify any of the control properties
on the subform, I don't get the prompt. If I add a DoCmd.SetWarnings False,
I don't get the prompt and any properties I've modified on the subform are
saved.
Should I just use the DoCmd.SetWarnings False to suppress the prompt? Or do
you recommend that I save the subform explicitly, and if so, can you give me
a code example?
Thanks