P
Pete Beatty
I am having a problem with my dialog window. I have a form that process
some data and activates a dialog window when an error occurs. On the dialog
window, there is a button that executes the "docmd.close" command. Upon
execution, the dialog form and the form that executed the original
"OpenForm" also closes. I have placed some code snippets below to assist.
I have bracketed the "OpenForm" and the "Close" commands. when the Dialog
closes the window, it transfers to the "Close" procedure in the calling
form. I do not understand this action and need to close this error. The
way I understand it, the dialog window should transfer control the
instruction following the instantiation of the form. WHAT IS GOING ON???
Any Ideas would be appreciated.
Form 1 (Import Records)
Process records until eof
If errors found
stDocName = "frmCheck Member Duplication"
strLink = "[DupConstant] = """ & tmpDup & """"
DoCmd.OpenForm stDocName, acViewForm, , strLink, acFormReadOnly,
acDialog, tmpDup
endif
next record
sub close
close the DB
clear the public variables
end sub
* there are not other significant subs (e.g. deactivate, unload)
Form 2 (frmCheck Member Duplication)
correct the errors
sub cmdcloseform
docmd.close
end sub
* this is the only sub procedure in the form
some data and activates a dialog window when an error occurs. On the dialog
window, there is a button that executes the "docmd.close" command. Upon
execution, the dialog form and the form that executed the original
"OpenForm" also closes. I have placed some code snippets below to assist.
I have bracketed the "OpenForm" and the "Close" commands. when the Dialog
closes the window, it transfers to the "Close" procedure in the calling
form. I do not understand this action and need to close this error. The
way I understand it, the dialog window should transfer control the
instruction following the instantiation of the form. WHAT IS GOING ON???
Any Ideas would be appreciated.
Form 1 (Import Records)
Process records until eof
If errors found
stDocName = "frmCheck Member Duplication"
strLink = "[DupConstant] = """ & tmpDup & """"
DoCmd.OpenForm stDocName, acViewForm, , strLink, acFormReadOnly,
acDialog, tmpDup
endif
next record
sub close
close the DB
clear the public variables
end sub
* there are not other significant subs (e.g. deactivate, unload)
Form 2 (frmCheck Member Duplication)
correct the errors
sub cmdcloseform
docmd.close
end sub
* this is the only sub procedure in the form