jrunyon
02-26-2004, 08:04 AM
I want to perform a check to see if a form is opened, without opening it. I tried the following code below, but it actually opens the form and I don't want to open if it isn't opened.
Case "FPolRetrvl"
If FrmP1ImgRtv.Visible = False Then
If FrmImgRtv.WindowState = 1 Then
FrmImgRtv.WindowState = 0
Else
FrmImgRtv.Show
End If
Else
RetVal = MsgBox("FMPA Image Retrieval cannot be opened with Priority1 Image Retrieval Opened. Do you want me to close Priority1 Image Retrieval?", vbYesNo, "Unable to Grant Request!")
If RetVal = 6 Then
Unload FrmP1ImgRtv
FrmImgRtv.Show
Else
Exit Sub
End If
End If
Case "FPolRetrvl"
If FrmP1ImgRtv.Visible = False Then
If FrmImgRtv.WindowState = 1 Then
FrmImgRtv.WindowState = 0
Else
FrmImgRtv.Show
End If
Else
RetVal = MsgBox("FMPA Image Retrieval cannot be opened with Priority1 Image Retrieval Opened. Do you want me to close Priority1 Image Retrieval?", vbYesNo, "Unable to Grant Request!")
If RetVal = 6 Then
Unload FrmP1ImgRtv
FrmImgRtv.Show
Else
Exit Sub
End If
End If