Nov 4, 2003 #1 dcarbone Programmer Aug 22, 2003 29 CA I am trying to select records from a table, based on their number in an autonumber field. But when i run the query, i get DATA type mismatch. i used the following code sql = "select * from table where ID = '"& id &"' "
I am trying to select records from a table, based on their number in an autonumber field. But when i run the query, i get DATA type mismatch. i used the following code sql = "select * from table where ID = '"& id &"' "
Nov 4, 2003 #2 SarkMan Programmer Apr 1, 2002 182 US Remove the single quotes around the id since the field should be a number sql = "select * from table where ID = "& id Upvote 0 Downvote
Remove the single quotes around the id since the field should be a number sql = "select * from table where ID = "& id
Nov 4, 2003 #3 alsoknownas Technical User Oct 3, 2003 107 US what id number are you trying to display? Replace the '"& id &"' " with the id number you're trying to display -------------------------------------------------------------------------------------------- Upvote 0 Downvote
what id number are you trying to display? Replace the '"& id &"' " with the id number you're trying to display --------------------------------------------------------------------------------------------
Nov 4, 2003 #4 alsoknownas Technical User Oct 3, 2003 107 US I guess you're not trying to display a specific Id. do as SarkMan said -------------------------------------------------------------------------------------------- Upvote 0 Downvote
I guess you're not trying to display a specific Id. do as SarkMan said --------------------------------------------------------------------------------------------