OpenRecordset Error

BenSteckler

Addicted to Programming
Local time
Today, 05:31
Joined
Oct 4, 2000
Messages
44
Hi Everyone,

I am attempting to run this code, but I keep recieving this error.

Type Mismatch

I have refered to the Help section and other source code, but I am still unable to find out what I am doing wrong.

Can some one assist me?

Here is the begining of my source code:
Code:
    'Set up variables
    Dim dbs As Database
    Dim RST As Recordset
    Dim Sql As String
    Dim I As Integer
    
    'Set the value of the database to this database
    Set dbs = CurrentDb
    
    'Enter the sql statement here or table to open
    Sql = "SELECT SignInId, IMLeadName FROM tblTeamMembers"
    
    Set RST = dbs.OpenRecordset(Sql)

Thanks
BDS :confused:
 
Just a thought, but you are using SQL as a variable. Is that a reserved word? Try a different variable.
 

Users who are viewing this thread

Back
Top Bottom