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  

Critera entries



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2009, 08:21 PM posted to microsoft.public.access.queries
tendoy5
external usenet poster
 
Posts: 6
Default Critera entries

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5
  #2  
Old September 23rd, 2009, 08:28 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Critera entries

This calls for a parameter! In the criteria of the date field in question put:

[Enter the Date]


Next with that query in design view go up to Query, Parameter and put the
following in the Parameter column and make it a Date/Time data type. It must
be exactly what is between the brackets in the criteria including the
brackets.
[Enter the Date]
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5

  #3  
Old September 23rd, 2009, 08:35 PM posted to microsoft.public.access.queries
tendoy5
external usenet poster
 
Posts: 6
Default Critera entries

Did exactly that but when i clicked run and entered the date, I got an error
"the value you entered isn't valid for this field". I tried mm/dd/yy and
mm/dd/yyyy.
--
Tendoy5


"Jerry Whittle" wrote:

This calls for a parameter! In the criteria of the date field in question put:

[Enter the Date]


Next with that query in design view go up to Query, Parameter and put the
following in the Parameter column and make it a Date/Time data type. It must
be exactly what is between the brackets in the criteria including the
brackets.
[Enter the Date]
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5

  #4  
Old September 23rd, 2009, 08:45 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default Critera entries

Check the properties for that field in table design view. Is it a Date/Time
field or a text field?

Also show us the SQL for the query that works now. Open the query in design
view. Next go to View, SQL View and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

Did exactly that but when i clicked run and entered the date, I got an error
"the value you entered isn't valid for this field". I tried mm/dd/yy and
mm/dd/yyyy.
--
Tendoy5


"Jerry Whittle" wrote:

This calls for a parameter! In the criteria of the date field in question put:

[Enter the Date]


Next with that query in design view go up to Query, Parameter and put the
following in the Parameter column and make it a Date/Time data type. It must
be exactly what is between the brackets in the criteria including the
brackets.
[Enter the Date]
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5

  #5  
Old September 23rd, 2009, 09:09 PM posted to microsoft.public.access.queries
tendoy5
external usenet poster
 
Posts: 6
Default Critera entries

The property for that field in the table was/is Date/Time. Still does not
work.
Well, actually it works if I type 12/31/2006 but not if I type 09/31/2006.
Will not run if the first digit is 0. What do I do for months Jan-Sept?

here is SLQ view:
PARAMETERS [Enter the Date] DateTime;
SELECT Performance.[Date Proposal Submitted], Performance.[Name Proposal
Submitted], Performance.[Contract Name (FULL)], Performance.[Contract Name],
Performance.[Prime or Sub], Performance.[If Sub, Who's Prime],
Performance.[Contract Number], Performance.[Subcontract Number],
Performance.[Task Order Number], Performance.[Contract Type],
Performance.[Start Date], Performance.[End Date], Performance.[Beginning
Value], Performance.[Total Amount], Performance.[As of (Date)],
Performance.[Cost Growth], Performance.[Customer/Contracting Agency],
Performance.COTR, Performance.[Government PM/Sub PM], Performance.[Technical
POC], Performance.[Contracting POC], Performance.[Quantum Lead POC],
Performance.[Description of Contract], Performance.Accomplishments,
Performance.[Special Problems/Actions Taken], Performance.[Relevant
Keywords], Performance.[Other Remarks]
FROM Performance
WHERE (((Performance.[End Date])[Enter the Date]));

--
Tendoy5


"Jerry Whittle" wrote:

Check the properties for that field in table design view. Is it a Date/Time
field or a text field?

Also show us the SQL for the query that works now. Open the query in design
view. Next go to View, SQL View and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

Did exactly that but when i clicked run and entered the date, I got an error
"the value you entered isn't valid for this field". I tried mm/dd/yy and
mm/dd/yyyy.
--
Tendoy5


"Jerry Whittle" wrote:

This calls for a parameter! In the criteria of the date field in question put:

[Enter the Date]

Next with that query in design view go up to Query, Parameter and put the
following in the Parameter column and make it a Date/Time data type. It must
be exactly what is between the brackets in the criteria including the
brackets.
[Enter the Date]
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5

  #6  
Old September 23rd, 2009, 10:01 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Critera entries

Try this --
WHERE (((Performance.[End Date])CVDate([Enter the Date])));

--
Build a little, test a little.


"tendoy5" wrote:

The property for that field in the table was/is Date/Time. Still does not
work.
Well, actually it works if I type 12/31/2006 but not if I type 09/31/2006.
Will not run if the first digit is 0. What do I do for months Jan-Sept?

here is SLQ view:
PARAMETERS [Enter the Date] DateTime;
SELECT Performance.[Date Proposal Submitted], Performance.[Name Proposal
Submitted], Performance.[Contract Name (FULL)], Performance.[Contract Name],
Performance.[Prime or Sub], Performance.[If Sub, Who's Prime],
Performance.[Contract Number], Performance.[Subcontract Number],
Performance.[Task Order Number], Performance.[Contract Type],
Performance.[Start Date], Performance.[End Date], Performance.[Beginning
Value], Performance.[Total Amount], Performance.[As of (Date)],
Performance.[Cost Growth], Performance.[Customer/Contracting Agency],
Performance.COTR, Performance.[Government PM/Sub PM], Performance.[Technical
POC], Performance.[Contracting POC], Performance.[Quantum Lead POC],
Performance.[Description of Contract], Performance.Accomplishments,
Performance.[Special Problems/Actions Taken], Performance.[Relevant
Keywords], Performance.[Other Remarks]
FROM Performance
WHERE (((Performance.[End Date])[Enter the Date]));

--
Tendoy5


"Jerry Whittle" wrote:

Check the properties for that field in table design view. Is it a Date/Time
field or a text field?

Also show us the SQL for the query that works now. Open the query in design
view. Next go to View, SQL View and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

Did exactly that but when i clicked run and entered the date, I got an error
"the value you entered isn't valid for this field". I tried mm/dd/yy and
mm/dd/yyyy.
--
Tendoy5


"Jerry Whittle" wrote:

This calls for a parameter! In the criteria of the date field in question put:

[Enter the Date]

Next with that query in design view go up to Query, Parameter and put the
following in the Parameter column and make it a Date/Time data type. It must
be exactly what is between the brackets in the criteria including the
brackets.
[Enter the Date]
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"tendoy5" wrote:

I am trying to run a query based on the end date of a contract. Idealy, I
would like to be able to enter a date and have the query produce all
contracts with end dates after the date I entered. I would like to have a
pop-up appear to ask me to enter a date so that I may enter a different date
every time I run the query. I can get it to run with and produce the info I
want but I would like to have the "search" as a switchboard button so many
people can use it instead of me changing the criteria everytime. Help please!
--
Tendoy5

 




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


All times are GMT +1. The time now is 05:20 PM.


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