[AccessD] Type Mismatch

Bigpond mcaro at bigpond.net.au
Fri Jun 4 18:41:45 CDT 2004


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??????

Martin



More information about the AccessD mailing list