T
Todd
HI there, the following code is returning the error, data-
type mismatch in criteria expression. I assume that my
Autonumber field has a diferent kind of datatype ? Can I
base criteria on that field? HELP.
Dim strsql As String
Dim findthis As Integer
Dim db As Database
Call CurrentDb.Execute("delete * from tbltemp2")
findthis = Me.Text70
If IsNull(findthis) Then
MsgBox "You must Enter an IPR into the Field To Search for
it.", vbCritical, "Search"
Exit Sub
Else
Set db = CurrentDb
strsql = "INSERT INTO tbltemp2 (IPRNumber, firstname,
lastname, address, account_number) Select tblhistory.
[aunIPRNumber], tblHistory.[strcustomernamefirst],
tblhistory.[strcustomernamelast], tblhistory.
[strcustomeraddress], tblhistory.[straccountnumber] " & _
"FROM tblHistory " & _
"WHERE tblHistory.[aunIPRNumber]= '" & findthis & "'"
Call CurrentDb.Execute(strsql)
Thanks.
Todd
type mismatch in criteria expression. I assume that my
Autonumber field has a diferent kind of datatype ? Can I
base criteria on that field? HELP.
Dim strsql As String
Dim findthis As Integer
Dim db As Database
Call CurrentDb.Execute("delete * from tbltemp2")
findthis = Me.Text70
If IsNull(findthis) Then
MsgBox "You must Enter an IPR into the Field To Search for
it.", vbCritical, "Search"
Exit Sub
Else
Set db = CurrentDb
strsql = "INSERT INTO tbltemp2 (IPRNumber, firstname,
lastname, address, account_number) Select tblhistory.
[aunIPRNumber], tblHistory.[strcustomernamefirst],
tblhistory.[strcustomernamelast], tblhistory.
[strcustomeraddress], tblhistory.[straccountnumber] " & _
"FROM tblHistory " & _
"WHERE tblHistory.[aunIPRNumber]= '" & findthis & "'"
Call CurrentDb.Execute(strsql)
Thanks.
Todd