Re: Mismatched Data Type in an Expression
From: Douglas J. Steele (NOSPAM_djsteele_at_NOSPAM_canada.com)
Date: 05/18/04
- Next message: Douglas J. Steele: "Re: ActiveX Data Objects Libraries References"
- Previous message: Tim: "Re: Second Recordset?"
- In reply to: Chris: "Mismatched Data Type in an Expression"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 May 2004 12:07:04 -0400
Your WHERE clause is assuming that [Request_Counter] is text.
If it's Long Integer (as your post says), get rid of the quotes:
[Request_Counter] = " & V
(the semi-colon isn't necessary, by the way)
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "Chris" <anonymous@discussions.microsoft.com> wrote in message news:e7d501c43cdd$85062d30$a401280a@phx.gbl... > Below is a sub I am using to compare two request counters > so I can update the one table. I keep getting an error > message on the SQL statement that says the data type is > mismatched. All of the data types in the table are ong > Integer as the length and the format as Fixed. > > I cannot seem to pinpoint what is wrong. Any help is > appreciated. > > -Chris > > > > Private Sub Requested_Docs_Received_Click() > Dim M As Recordset, D As Database, C As Recordset > Set D = CurrentDb > > If [Requested_Docs_Received] = True Then > Me![Missing_Docs] = False > V = [Forms]![frmMain].[Request_Counter] > Set M = D.OpenRecordset("Select [Missing_Docs_Received] > From [tblMissing] Where [Request_Counter] = '" & V & "';", > dbOpenSnapshot) > M![Missing_Docs_Received] = True > M.Update > End If
- Next message: Douglas J. Steele: "Re: ActiveX Data Objects Libraries References"
- Previous message: Tim: "Re: Second Recordset?"
- In reply to: Chris: "Mismatched Data Type in an Expression"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|