I have an update query as follows:
RecID=LB_Search_Company.Column(0)
DoCmd.RunSQL "UPDATE Tbl_OCN SET Tbl_Company.Client = ""-1"" WHERE ((([Tbl_Company].[ClientID])= " & RecID & "
);"
This gives me a Runtime Error '3464' ("Data type mismatch in criteria expression"
.
However, the query runs fine if I replace the RecID with the actually number:
DoCmd.RunSQL "UPDATE Tbl_OCN SET Tbl_Company.Client = ""-1"" WHERE ((([Tbl_Company].[ClientID])= ""1233""
);"
Where is my original query going wrong? -illini
RecID=LB_Search_Company.Column(0)
DoCmd.RunSQL "UPDATE Tbl_OCN SET Tbl_Company.Client = ""-1"" WHERE ((([Tbl_Company].[ClientID])= " & RecID & "
This gives me a Runtime Error '3464' ("Data type mismatch in criteria expression"
However, the query runs fine if I replace the RecID with the actually number:
DoCmd.RunSQL "UPDATE Tbl_OCN SET Tbl_Company.Client = ""-1"" WHERE ((([Tbl_Company].[ClientID])= ""1233""
Where is my original query going wrong? -illini