Selecting weeks of the year

drisconsult

Drisconsult
Local time
Today, 08:00
Joined
Mar 31, 2004
Messages
125
Hello All

I have a number of Select queries that select 1st quarter up to 4th quarter of the year for accounting purposes. These are quite simple queries such as:

between "10" and "24" entered in the Criteria window. 10 and 24 being week numbers.

However if I wish to randomly select the week numbers after the query is loaded what is the correct code?

Regards
Terence
London
 
Code:
SELECT *
FROM Table1
WHERE (((Table1.Weeknr)=CInt(52*Rnd(Now()))));
Enjoy!
 
Hello Guus2005
Many thanks for your reply, but please help a thickie out here. When I run the query, the "Enter Parameter Value" dialog box will appear and the user then has to enter the two weeks number. So where would I have entered the code?
 
You get the "Enter Parameter Value" box? What is the message?

Put the select statement in a query and run it. If the table and field names match, it should work.
 

Users who are viewing this thread

Back
Top Bottom