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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Default date on form



 
 
Thread Tools Display Modes
  #1  
Old June 15th, 2004, 01:02 AM
joe
external usenet poster
 
Posts: n/a
Default Default date on form

Hello ,

It it possible to have a default date set on the form for every saturday of the month.I always have to go to properties of the date field and change it to saturdays even though the entries are done on every monday,(report requirements need to reflect a saturday date).
Thanks
  #2  
Old June 15th, 2004, 02:24 AM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Default date on form

Joe

Are you saying that you want to use a form to set a date that reflects the
next Saturday following the day entries are done? I don't understand what
you mean by "for every saturday of the month."

If your entries a ALWAYS made on a Monday, you could use Date() + 5 to get
the Saturday date.

--
Good luck

Jeff Boyce
Access MVP

  #3  
Old June 15th, 2004, 02:26 AM
John Vinson
external usenet poster
 
Posts: n/a
Default Default date on form

On Mon, 14 Jun 2004 17:02:01 -0700, joe
wrote:

Hello ,

It it possible to have a default date set on the form for every saturday of the month.I always have to go to properties of the date field and change it to saturdays even though the entries are done on every monday,(report requirements need to reflect a saturday date).
Thanks


Well, no: a default *is a value*, not "every Saturday".

Which Saturday do you want - previous or next? I'd suggest using VBA
code in the AfterUpdate event of the date field:

Private Sub txtDatefield_AfterUpdate()
Me!txtDateField = DateAdd("d", 1 - _
DatePart("w", txtDateField, vbSaturday))
End Sub

Make it 8 instead of 1 if you want the Saturday following the date.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #4  
Old June 15th, 2004, 02:36 AM
GVaught
external usenet poster
 
Posts: n/a
Default Default date on form

If the entries are done every Monday you can calculate the date for Saturday
by using the DateAdd Function.
On the report that prints out create an textbox and place the calculation:
=DateAdd(d, 5, [DateField]). Where 'd' indicates day, 5 indicates the number
of days to add to the Date in the DateField and [DateField] is the name of
your field where the your date indicates Monday's date.

This will only work if all entered dates truly fall on a Monday. This also
eliminates the need to change the date entered at data entry time as the
calculated field on the report will calculate to a Saturday date. You can
hide the original date and show the calculated date.
"joe" wrote in message
news
Hello ,

It it possible to have a default date set on the form for every saturday
of the month.I always have to go to properties of the date field and change
it to saturdays even though the entries are done on every monday,(report
requirements need to reflect a saturday date).
Thanks



  #5  
Old June 15th, 2004, 11:48 AM
Joe
external usenet poster
 
Posts: n/a
Default Default date on form

First thanks for all the responses.

Ok, yesterday was Monday the 14, I have to go into
properties of the date field and change it to reflect the
past Saturday....the 12th.Next week it will be the same
thing...Monday the 21th...i will have to change it for the
previous Saturday..the 19th.All entries are done on Monday
but must reflect a saturday date......just looking for an
automated way to have this done for me....thanks for any
direction on this
-----Original Message-----
Joe

Are you saying that you want to use a form to set a date

that reflects the
next Saturday following the day entries are done? I

don't understand what
you mean by "for every saturday of the month."

If your entries a ALWAYS made on a Monday, you could use

Date() + 5 to get
the Saturday date.

--
Good luck

Jeff Boyce
Access MVP

.

  #6  
Old June 15th, 2004, 12:55 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Default date on form

Joe

Re-check the responses -- they've all given you a way to calculate a date
that falls (before or after) a date.

--
Good luck

Jeff Boyce
Access MVP

 




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 12:46 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.