Yes, on your commandbutton click event, chk to see if the pop up form is open
if (currentproject.allforms("formName").Isloaded) then
docmd.close acform, "formName", acSaveYes
Dim intX As Integer
Dim intCount As Integer
intCount = Forms.Count - 1
For intX = intCount To 0 Step -1
If Forms(intX).name = "myform" Then
DoCmd.Close acform,Forms(intX).name
Exit Sub
End if
Next
DoCmd.OpenForm "myform"
Yes, on your commandbutton click event, chk to see if the pop up form
is open if (currentproject.allforms("formName").Isloaded) then
docmd.close acform, "formName", acSaveYes
Good suggestion, but why "acSaveYes"? Do you really want to save design
changes to the form without prompting?
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.