IsLoaded question

T

Tony Williams

I have the following code to determine if a form is loaded when another form
is opened and if so the first form should be closed.
Private Sub Form_Load()
If IsLoaded("frmfindrecord") Then
DoCmd.Close acForm, "frmfindrecord"
End If
End Sub

However I get a message that says Compile Error-Sub or function not defined.

Can anyone tell me what's wrong here?
Thanks
Tony
 
A

Arvin Meyer [MVP]

In the latest version of Access, IsLoaded is a property of a form, but in
earlier versions, it is a function which must be defined. You'll find one
version of it in the Northwind sample database's standard modules.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 

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

Top