Instr

  • Thread starter Thread starter Asm
  • Start date Start date
A

Asm

Guest
This is rather urgent, I have an assignment due in today and I procrastinate with work until the absolute last possible minute. I'm currently trying to make a query that can recognise whether a loan is in place for a specific toy, this is how I would go about doing it. Apparently my synax is wrong, please help there is no time!

InStr([qryLoaned].[ToyIDNum], right([tblToy].[ToyIDNum], 0, len([tblToy].IDNum]),[qryLoaned].[ToyIDNum]))

Also, I don't think that's going to work unfortunately because If I was to search for 1 for example which I did originally it would tell me that toys with the label 11 or 22, or 17 for example have been loaned out. Sorry If this isn't precise but basically, I'm trying to search for a number in a table that corresponds to a number in another table, if the value is returned true then that item is loaned out, if the criteria returns false then it isn't loaned out.

With the value 1 if we instr in another table we are going to pull out values that contain 1, I want to eliminate these and just search for EXACTLY What I asked for in this case one and not 11.. 12... 13.. 14.. 15.. 16.. 31.. etc.

:( Please help.

Regards, Dan.
 
Sounds like you have an inefficient structure if you are having to carve up a field to do the comparison. I'm sure (if today is your deadline -tut tut, leaving your homework till the last minute ;) ) that you will not want to embark on a restructure.

Therefore, post an example of what will be contained in the fields you want to compare and we may be able to suggest a workaround.
 
Use the Query Wizard to create an Unmatched query for you, just add your own criteria when it's finished
 

Users who are viewing this thread

Back
Top Bottom