473,396 Members | 2,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Set criteria to find date records for this coming weekend

Hey guys, i have this code:

Expand|Select|Wrap|Line Numbers
  1. SELECT * 
  2. FROM QueryCases 
  3. WHERE Weekday(QueryCases.StartDate) In ('1','7') AND QueryCases.Completed = False 
  4. ORDER BY QueryCases.StartDate;
  5.  
the WHERE Weekday(QueryCases.StartDate) In ('1','7') returns any weekend records, how do i set criteria to only show weekend records for this coming weekend. Thanks in advance
Dec 14 '07 #1
3 1885
Rabbit
12,516 Expert Mod 8TB
Please use code tags.

This gives you the next saturday.
Expand|Select|Wrap|Line Numbers
  1. Date() + 7 - Weekday(Date())
  2.  
Add one to that and it'll give you the next sunday.

If it's saturday it'll give you that date.
If it's sunday it'll give you next week.
Dec 14 '07 #2
Amazing. thanks a million!
Dec 14 '07 #3
Rabbit
12,516 Expert Mod 8TB
Not a problem, good luck.
Dec 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Salad | last post by:
This may occur to you in the future. You want to get the min or max of a field that you set criteria on...maybe for a combo box. Let's say you wanted to get the minimum of all date fields where...
1
by: April | last post by:
I am working on a database to be used for auditing medical groups. TABLE:DETAILS contains these fields: (autonumber) 50 group fields through each a combo box that pulls from the same...
1
by: Jonny | last post by:
Hello, I have a list box which displays the date from and date to of each of my records. I also on my form, have a date from and date to box at the top. Both of these are unbound, and are to...
5
by: DW | last post by:
I have a query in Access 2003 that has the following criteria SELECT tblOrder.SessionDate, tblMenus.Item_Name, tblOrder.Type, Format$(tblorder!SessionDate,"Short Time") AS SessionTime,...
4
by: EJO | last post by:
In the query builder, I can create a query that will take a date/time as criteria, and the query finds the records: SELECT SRSrvcsEquip.Stock, SRSrvcsEquip.Activity, SRSrvcsEquip.EquipOwned,...
10
by: Daniel | last post by:
In Microsoft Access I can write a query that includes the criteria: Between Date()-7 And Date() to retrieve the records from a table that fall within the last week. I'm trying to write a...
2
by: Mark Roughton | last post by:
I have a form where the users need to view records for various criteria, one of which is a date field on which they may wish to view all related data for the selected date, for all dates upto and...
13
newnewbie
by: newnewbie | last post by:
I have an Access database that I upload a data extract intoto daily. I want to create a query that will give me a list of dates that no data can be found for. E.g. there are no records created on the...
8
by: Dr Al | last post by:
I have a table with four date fields, some of which may not be filled in based on our data entry needs. I have a criteria set as <date()-180 which is supposed to pull dates older than 180 days ago....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.