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
 

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.

Ask a Question

Back
Top