Found it in the developer's handbook.
If the form "frmSurvey" is open, IsOpen returns a -1. Then close it.
Dim IsOpen As Integer
IsOpen = SysCmd(acSysCmdGetObjectState, acForm, "frmSurvey")
If IsOpen <> 0 Then
DoCmd.Close acForm, "frmSurvey", acSaveYes
End If
Dave Mack