[jawsscripts] Re: inserting yesterday's date with a script

  • From: "Martin Slack" <m.g.slack@xxxxxxxxxxxx>
  • To: "JAWSScripts" <jawsscripts@xxxxxxxxxxxxx>
  • Date: Thu, 18 Feb 2010 07:35:14 -0000

I found this at:

http://www.classanytime.com/mis333k/sjdatetime.html

      DateAdd() Add and subtract dates.

      10/11/2002 returned by DateAdd("yyyy", 1, 10/11/2001#))
      Today's date + 30 days returned by DateAdd("d", 30, Date)
      The date 45 days ago returned by DateAdd("d", -45, Date)
      To find Monday of a week: DateAdd("d",-WeekDay(Date)2,Date)


Is the DateAdd () function available in Access VBA?  If not, a VBScript can 
certainly be written which converts the date to a day number in the range 
1-365, subtracts one, then converts back to date.  The script can then be 
run using the JAWS Run function.

  Martin


----- Original Message ----- 
From: "Jason Boston" <jwb3301@xxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, February 18, 2010 2:34 AM
Subject: [jawsscripts] inserting yesterday's date with a script


> HI all,
> I work in MS Access much of my day at work and have written a script I
> find
> very useful for pasting in  today's date based on the computers system
> date.
> Below is the script I use assigned to the key stroke "ctrl+shift+v".
> However,  I would like to create a similar script that pastes in
> yesterday's
> date based on the system date. Since the method I'm using defines the
> system
> date as a string, I can't figure out how to make it go back one day. Could
> anyone suggest how to accomplish this with JFW 11 and MS Access?
>
> Here's the script I use for pasting the  current date. BTW it works in a
> table, query, or a form.
>
> Script EnterCurrentDate ()
> Var
> String sDate
> Let sDate = SysGetDate ("MM/dd/yyyy")
> TypeString(sDate)
> ' next 2 lines takes focus away from current cell and brings it back
> quickly
> so jaws automatically reads you what was just posted.
> {tab}
> ShiftTabKey ()
> EndScript
>
>
>
>
>
>
> TIA
>
> Jason
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: