I have a database that contains a list of properties in several jurisdictions throughout the country with their parcel numbers. I have found one jurisdiction that has 500+ records that the data is messed up on the parcel number (don't ask me how). But here's what I need to do. The parcel number is a 10 digit number. I need to take the last two digits and place them at the beginning of the number. Here's the code I've written out with the error message I'm getting in green.
Public Function Parcel()
Dim db As Database, rst As Recordset, strSQL As String
Dim intLast2 As Integer, intFirst8 As Integer
strSQL = "SELECT [Parcel #], Notes "
strSQL = strSQL & "FROM [Loan table] "
strSQL = strSQL & "WHERE Payee=3105500000 AND Bookmarked=No;"
Set db = CurrentDb
Set rst = db.OpenRecordset(strSQL) Data type mismatch in criteria expression.
Do Until rst.EOF
intLast2 = Right(rst![Parcel #], 2)
intFirst8 = Left(rst![Parcel #], 8)
[Parcel #] = intLast2 & intFirst8
rst.MoveNext
Loop
End Function
Any ideas?
Public Function Parcel()
Dim db As Database, rst As Recordset, strSQL As String
Dim intLast2 As Integer, intFirst8 As Integer
strSQL = "SELECT [Parcel #], Notes "
strSQL = strSQL & "FROM [Loan table] "
strSQL = strSQL & "WHERE Payee=3105500000 AND Bookmarked=No;"
Set db = CurrentDb
Set rst = db.OpenRecordset(strSQL) Data type mismatch in criteria expression.
Do Until rst.EOF
intLast2 = Right(rst![Parcel #], 2)
intFirst8 = Left(rst![Parcel #], 8)
[Parcel #] = intLast2 & intFirst8
rst.MoveNext
Loop
End Function
Any ideas?