open forms

  • Thread starter Thread starter seeker4
  • Start date Start date
S

seeker4

Is there a way to have code check to see if a form is open
before is tries to set focus on an object in said form?

seeker4
 
Public Function IsOpen(strName As String) As Boolean
On Error Resume Next
Dim Junk As String
Err.Clear
Junk = Forms(strName).Name
IsOpen = (Err.Number = 0)
Err.Clear
End Function
 
Back
Top