newbie code help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

as a new coder, could I get a bit of help. What is the syntax for:

"if frmCustomers isn't open, then open it" ?

Thanks
 
hi Victoria,
as a new coder, could I get a bit of help. What is the syntax for:
"if frmCustomers isn't open, then open it" ?
If Not FormIsLoaded("frmCustomers") Then
DoCmd.OpenForm "frmCustomers"
End If

I'm still using the good FormIsLoaded function (paste it into a normal
module):

Public Function FormIsLoaded(AFormName As String _
) As Boolean

On Local Error Resume Next

FormIsLoaded = False
If SysCmd(acSysCmdGetObjectState, acForm, AFormName) <> 0 Then
If Forms(AFormName).CurrentView <> 0 Then
FormIsLoaded = True
End If
End If

End Function


mfG
--> stefan <--
 

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