Stuart McLachlan
stuart at lexacorp.com.pg
Fri Jun 4 19:17:17 CDT 2004
On 5 Jun 2004 at 9:41, Bigpond wrote: > Hi folks > > I'm getting a Type Mismatch (13) error on the OpenRecordset line of the following code > > Private Sub cmdTest_Click() > Dim rst As Recordset > Dim db As Database > On Error GoTo HandleErrors > Set db = CurrentDb() > Set rst = db.OpenRecordset("SELECT DISTINCT ClientTypeID FROM GBBClients") > . > . > End Sub > > I have checked the table "GBBClients" and the field "ClientTypeID" is a number. > I inserted a text field called "ClientType" into the table and the following line also give the same error. > > Set rst = db.OpenRecordset("SELECT DISTINCT ClientType FROM GBBClients") > > Is it so obvious that I can't see it?????? > DAO/ADODB ? Do you have both referenced and if so, in what order. You will get this error with an ADODB recordset. -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support.