H
Heather Vernon
I keep getting an error ("Arguments are of the wrong type, are out of
acceptable range, or are in conflict with one another") with my
rstAnimals.find command if my string strTagID starts with a letter. But I
don't get an error if strTagID starts with a number (regardless of whether
there are other letters in the string). If I nest my string in quotes, like
would make sense, I don't get an error BUT I can't find my strTagID in my
recordset if it starts with a number (I'm not sure if it finds the record if
strTagID starts with a letter). Hopefully one of you can see an obvious
solution that I can't. I'd rather not check if the first character is
numeric, and then execute a different find command for each case (if it even
works when the string starts w/ a letter).
rstAnimals.Open "SELECT Right([tblAnimalInfo]![TagId],4) As Ref, " & _
" tblCollection.CollectionId" & _
" FROM tblCollection INNER JOIN (tblAnimalInfo INNER JOIN
tblSelections ON" & _
" tblAnimalInfo.AnimalId = tblSelections.AnimalId) ON" & _
" tblAnimalInfo.AnimalId = tblCollection.AnimalID" & _
" WHERE " & strIDs, _
CurrentProject.Connection, adOpenStatic, adLockReadOnly
acceptable range, or are in conflict with one another") with my
rstAnimals.find command if my string strTagID starts with a letter. But I
don't get an error if strTagID starts with a number (regardless of whether
there are other letters in the string). If I nest my string in quotes, like
would make sense, I don't get an error BUT I can't find my strTagID in my
recordset if it starts with a number (I'm not sure if it finds the record if
strTagID starts with a letter). Hopefully one of you can see an obvious
solution that I can't. I'd rather not check if the first character is
numeric, and then execute a different find command for each case (if it even
works when the string starts w/ a letter).
rstAnimals.Open "SELECT Right([tblAnimalInfo]![TagId],4) As Ref, " & _
" tblCollection.CollectionId" & _
" FROM tblCollection INNER JOIN (tblAnimalInfo INNER JOIN
tblSelections ON" & _
" tblAnimalInfo.AnimalId = tblSelections.AnimalId) ON" & _
" tblAnimalInfo.AnimalId = tblCollection.AnimalID" & _
" WHERE " & strIDs, _
CurrentProject.Connection, adOpenStatic, adLockReadOnly