RECORDSET

P

PS

FURTHER TO PREVIOUS POSTING
ANY THOUGHT OF WHAT I NEED TO ADD PLEASE

Dim db As Database

Dim rs As Recordset

Set db = CurrentDb

Set rs = OpenRecordset("AnalyteAlias")
the above line of code says 'SUB OR FUNCTION NOT DEFINED'
 
D

Dave Patrick

These may help.

http://www.microsoft.com/accessdev/articles/daoconst.htm
http://www.microsoft.com/Accessdev/articles/bapp97/chapters/ba09_1.htm

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| FURTHER TO PREVIOUS POSTING
| ANY THOUGHT OF WHAT I NEED TO ADD PLEASE
|
| Dim db As Database
|
| Dim rs As Recordset
|
| Set db = CurrentDb
|
| Set rs = OpenRecordset("AnalyteAlias")
| the above line of code says 'SUB OR FUNCTION NOT DEFINED'
|
 
G

Gordon Currie

PS said:
Dim db As Database

Dim rs As Recordset

Set db = CurrentDb

Set rs = OpenRecordset("AnalyteAlias")
the above line of code says 'SUB OR FUNCTION NOT DEFINED'


Set rs = db.OpenRecordset("AnalyteAlias")

and it should work fine. As long as you actually have a query called AnalyteAlias.

-Gordon
 
D

Douglas J. Steele

Gordon Currie said:
Set rs = db.OpenRecordset("AnalyteAlias")

and it should work fine. As long as you actually have a query called
AnalyteAlias.

As well, since they're using DAO, it would make sense to guarantee that the
objects are actually DAO.

Dim db As DAO.Database
Dim rs As DAO.Recordset

(Yes, I realize that the DAO.Database isn't strictly necessary, but it won't
cause an error to use it)
 

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