If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
can you specifie criteria for a parameter query in an Auto Number.
I have created a parameter query, and specified criteria in an Auto Number
field (which is also the primary key) and when i run the query i get no results. Why? |
#2
|
|||
|
|||
Ofer thank you very much for your help. I will try it.
Lea "Ofer" wrote: Try this WHERE [2005 BuckSlips].[Number]=[Enter Number to Print:] Or WHERE [2005 BuckSlips].[Number]=cdbl([Enter Number to Print:]) Or WHERE [2005 BuckSlips].[Number] Like cdbl([Enter Number to Print:]) -- I hope that helped Good luck "Lea" wrote: SELECT [2005 BuckSlips].Number, [2005 BuckSlips].[Date Requested], [2005 BuckSlips].[Requested By], [2005 BuckSlips].Priority, [2005 BuckSlips].City, [2005 BuckSlips].County, [2005 BuckSlips].[State Route], [2005 BuckSlips].[Mile Post], [2005 BuckSlips].Location, [2005 BuckSlips].Recommendations, [2005 BuckSlips].Completed FROM [2005 BuckSlips] WHERE ((([2005 BuckSlips].Number)=[Enter Number to Print:])); "Ofer" wrote: Can you post the SQL? -- I hope that helped Good luck "Lea" wrote: I have created a parameter query, and specified criteria in an Auto Number field (which is also the primary key) and when i run the query i get no results. Why? |
#3
|
|||
|
|||
On Tue, 13 Sep 2005 14:40:27 -0700, Lea
wrote: I have created a parameter query, and specified criteria in an Auto Number field (which is also the primary key) and when i run the query i get no results. Why? Probably because your query, or your criteria, are incorrect. We can't see them, so we can't help. Care to open the query in SQL view and help us to help you? John W. Vinson[MVP] |
#4
|
|||
|
|||
"Number" IS a reserved word in JET SQL.
Suggest you change the Field name to something else different from "Number". Try the following SQL: SELECT [2005 BuckSlips].[Number], [2005 BuckSlips].[Date Requested], [2005 BuckSlips].[Requested By], [2005 BuckSlips].Priority, [2005 BuckSlips].City, [2005 BuckSlips].County, [2005 BuckSlips].[State Route], [2005 BuckSlips].[Mile Post], [2005 BuckSlips].Location, [2005 BuckSlips].Recommendations, [2005 BuckSlips].Completed FROM [2005 BuckSlips] WHERE ((([2005 BuckSlips].[Number])=[Enter Number to Print:])); Note the square brackets around "Number". HTH Van T. Dinh MVP (Access) "Lea" wrote in message ... SELECT [2005 BuckSlips].Number, [2005 BuckSlips].[Date Requested], [2005 BuckSlips].[Requested By], [2005 BuckSlips].Priority, [2005 BuckSlips].City, [2005 BuckSlips].County, [2005 BuckSlips].[State Route], [2005 BuckSlips].[Mile Post], [2005 BuckSlips].Location, [2005 BuckSlips].Recommendations, [2005 BuckSlips].Completed FROM [2005 BuckSlips] WHERE ((([2005 BuckSlips].Number)=[Enter Number to Print:])); "Ofer" wrote: Can you post the SQL? -- I hope that helped Good luck "Lea" wrote: I have created a parameter query, and specified criteria in an Auto Number field (which is also the primary key) and when i run the query i get no results. Why? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Criteria for Parameter Query | bdehning | General Discussion | 4 | December 27th, 2008 06:10 AM |
Error when running Query, but not Report | Blaze | Running & Setting Up Queries | 29 | September 9th, 2005 05:40 AM |
Parameter Query with Variable Criteria | Erika | Running & Setting Up Queries | 3 | August 12th, 2005 04:56 PM |
Using Combo Boxes as criteria for a parameter query | Ruthy710 | Running & Setting Up Queries | 2 | November 23rd, 2004 07:08 PM |
Taher | Setting Up & Running Reports | 1 | August 31st, 2004 09:07 PM |