A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

can you specifie criteria for a parameter query in an Auto Number.



 
 
Thread Tools Display Modes
  #1  
Old September 13th, 2005, 10:40 PM
Lea
external usenet poster
 
Posts: n/a
Default 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  
Old September 13th, 2005, 10:48 PM
Lea
external usenet poster
 
Posts: n/a
Default

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  
Old September 13th, 2005, 11:34 PM
John Vinson
external usenet poster
 
Posts: n/a
Default

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  
Old September 14th, 2005, 04:31 AM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default

"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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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
Print Taher Setting Up & Running Reports 1 August 31st, 2004 09:07 PM


All times are GMT +1. The time now is 02:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.