473,499 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set Default Date Form Value to run from Fri to Sun, when ran on a Mon?

1 New Member
I need to set a default date on a form that when it comes to a Monday, the form from and to dates will default to the Friday to Sunday of the previous week. For all other day, the form should default to the previous day.

Can anyone help?
Thanks in advance
Feb 24 '06 #1
1 1984
CaptainD
135 New Member
First, need to know what language or program you're using.

Basically, use a DayOfWeek(YourDate) (Depends on the program or language)to find out what day your at and then use a DateAdd(YourDate, -HowManyDays) to get the date you want.

I need to set a default date on a form that when it comes to a Monday, the form from and to dates will default to the Friday to Sunday of the previous week. For all other day, the form should default to the previous day.

Can anyone help?
Thanks in advance
Mar 29 '06 #2

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

Similar topics

4
7201
by: Ragnar Heil | last post by:
I have got a form where I offer a default date (01.01.2004) and visitors can change it and make queries in the database. After changing this, the customized date should be displayed in the form...
11
12456
by: David Messner | last post by:
Ok I know this is simple but the statement eludes me... I have a date field where I want the default value on the data entry form's date field to be the last date entered. I figure I can do this...
1
4470
by: Delatere | last post by:
Hello, can anabody help? in the following part i cannot pass de desired default value In the module of the mbd i declared: Global datum_Glo As String in a form (Dossier_FRM)i did
4
3366
by: helenwheelss | last post by:
Access 2003, using a bound form. I'm seeing rather annoying behaviour when editing data in a control with a default value. It only happens when the form is on a new record. A specific...
4
3414
by: JHite | last post by:
I am using Access 2003 on Windows XP. This is a simple database that contains “tblStaffers” containing names of the office staffers, “tblProjects” containing names of the office projects, and...
0
7180
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
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6905
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
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5485
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,...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3103
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.