hello i get this error "Data type mismatch in criteria expression" with the code below
mySQL = "SELECT tblCatch.tblSpecies, tblCatch.tblBait, tblCatch.Image, tblCatch.tblReturned, tblCatch.tblSize"
mySQL = mySQL + " FROM tblCatch"
mySQL = mySQL + " WHERE (((tblCatch.tblTripId)=' & strTripid & '))"
ive tried changing the data types etc but cant get it to work, not sure what im doin wrong if anybody can help, i would have prefered to have it like this
mySQL = "SELECT tblCatch.tblSpecies, tblCatch.tblBait, tblCatch.Image, tblCatch.tblReturned, tblCatch.tblSize"
mySQL = mySQL + " FROM tblCatch"
mySQL = mySQL + " WHERE (((tblCatch.tblTripId)=[tblTripid]))"
but when i refer to the field directly in the criteria it always returns a result as if theirs no criteria, ie shows results with all tripids not just the one i wanted, this happened on a similar peice of code earlier in the form, but soon as i used a variable it worked fine..
their must be something fundamental im missing and need to understand,
any help appreciated
craig
mySQL = "SELECT tblCatch.tblSpecies, tblCatch.tblBait, tblCatch.Image, tblCatch.tblReturned, tblCatch.tblSize"
mySQL = mySQL + " FROM tblCatch"
mySQL = mySQL + " WHERE (((tblCatch.tblTripId)=' & strTripid & '))"
ive tried changing the data types etc but cant get it to work, not sure what im doin wrong if anybody can help, i would have prefered to have it like this
mySQL = "SELECT tblCatch.tblSpecies, tblCatch.tblBait, tblCatch.Image, tblCatch.tblReturned, tblCatch.tblSize"
mySQL = mySQL + " FROM tblCatch"
mySQL = mySQL + " WHERE (((tblCatch.tblTripId)=[tblTripid]))"
but when i refer to the field directly in the criteria it always returns a result as if theirs no criteria, ie shows results with all tripids not just the one i wanted, this happened on a similar peice of code earlier in the form, but soon as i used a variable it worked fine..
their must be something fundamental im missing and need to understand,
any help appreciated
craig