Hello group - hopefully this isn't to novice of a question - but I have been at this for a while and can't get the logic or the syntax right.
I have 2 tables ( in access) - I go through 3 pages of queries narrowing make, model and year and end up with 1 variable - #BoltPattern# - it is just text field in access - but is a numerical value i.e 4110 or 5108 - (always 4 numbers) I am trying to take that variable BoltPattern and query a long list in a second table - Items - In this Items table - I need to pull ALL ItemCode and ItemID where the BoltPattern matches the last (right most) 4 characters in the ItemCode field. THe last set of queries I ran was - <cfquery name="GetBoltPattern" datasource="speedpeople"> SELECT BoltPattern FROM WheelAppGuide WHERE Make = '#Make#' AND Model = '#Model#' AND YearStart <= '#YearLooking#' AND YearEnd >= '#YearLooking#' </cfquery> // previously worked for me and is running on site - but now I am getting data mismatch erros - 1st problem - I output the query here so I can use in the next query - <cfoutput><cfset BoltPattern="#GetBoltPattern.BoltPattern#"></cfoutput> // then compare to right set of numbers of item code from items --> <cfquery name="GetWheelCodes" datasource="speedpeople"> SELECT ItemID, ItemName, ItemCode FROM Items WHERE Right(ItemCode, 4) = #BoltPattern# </cfquery> Obviously it is not working. I have a feeling I am missing something obvious. Again in a nut shell. I get variable - BoltPattern from 1 table - through a series of forms. Then I need to match that BoltPattern with the right 4 chars of ItemCode ( #RIGHT(ItemCode, 4)# ) from 2nd table Thank you in advance, this is something that should be taking a few minutes that I am wasting a saturday evening on. Thanks!!!! jay miller ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

