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  

Parameter Query Criteria



 
 
Thread Tools Display Modes
  #1  
Old June 2nd, 2005, 04:29 PM
rwitosky
external usenet poster
 
Posts: n/a
Default Parameter Query Criteria

Is it possible to create a criteria based on a work week number for a field
that is formatted as a standard date (mm/dd/yyyy). I would just like to
enter a work week number and not a start date and end date. Can I do this?
If so how would I write the criteria?
  #2  
Old June 2nd, 2005, 04:47 PM
fredg
external usenet poster
 
Posts: n/a
Default

On Thu, 2 Jun 2005 08:29:25 -0700, rwitosky wrote:

Is it possible to create a criteria based on a work week number for a field
that is formatted as a standard date (mm/dd/yyyy). I would just like to
enter a work week number and not a start date and end date. Can I do this?
If so how would I write the criteria?


Add a new column to the query grid.
ExpatePart("ww",[DateField])

On this column's criteria line, write:
[Enter Week Number wanted]

Enter a value of 1 to 53 when prompted.

Caution, the above will return records of week # X regardless of year,
i.e week #26 of the year 2003, 2004, 2005, etc.
Is that OK?

If you need records for just a specific year, add another column.

Exp2:Year([DateField])
As criteria, write
[Enter Year]
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
 




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
Parameter Query and Criteria Comancheace New Users 4 April 20th, 2005 12:08 AM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Running & Setting Up Queries 1 December 13th, 2004 07:54 PM
Print Taher Setting Up & Running Reports 1 August 31st, 2004 09:07 PM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM


All times are GMT +1. The time now is 02:37 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.