A
alex
Immediate Window?
Hello,
Using Access ’03…
I’m sure this must be an easy question, but I’m a bit confused.
Why can I run this function in the Immediate Window of a global module
but not in a Class Module.
Function Test()
'Dim db As Database
Dim sql As String
'Set db = CurrentDb()
sql = "select * from table"
Debug.Print sql
'Set ds = db.CreateDynaset(sql)
End Function
In a Global Module - ?Test() will return the sql string.
In a Class Module - ?Test() will return the error: Sub or Function
not defined.
Thanks,
alex
Hello,
Using Access ’03…
I’m sure this must be an easy question, but I’m a bit confused.
Why can I run this function in the Immediate Window of a global module
but not in a Class Module.
Function Test()
'Dim db As Database
Dim sql As String
'Set db = CurrentDb()
sql = "select * from table"
Debug.Print sql
'Set ds = db.CreateDynaset(sql)
End Function
In a Global Module - ?Test() will return the sql string.
In a Class Module - ?Test() will return the error: Sub or Function
not defined.
Thanks,
alex