View Single Post
  #2  
Old April 27th, 2004, 02:55 PM
Dan Artuso
external usenet poster
 
Posts: n/a
Default Using OpenRecordset

Hi,
Both the DAO and ADO libraries have recordset objects.
You obviously have references to both so you'll have to declare your rs
like:
Dim rs As DAO.Recordset

HTH
Dan Artuso, MVP

"Conor Grogan" wrote in message
...
I have a button on a form called "command9". When this is clicked I want

to go through all the entries of a table called, "Device Table". I using the
following code:

Private Sub Command9_Click()
Dim rs As Recordset
Set rs = CurrentDb.OpenRecordset("Device Table")
With rs

Do Until .EOF


I am getting the following error, "Runtime error '13': Type Mismatch".

Have I declared rs wrong? How can I over come the problem? Can this be run
on queries as well as on tables?
Any help would be much appreciated.