Date input shortcut (1 Viewer)

sdawson

Registered User.
Local time
Today, 18:16
Joined
Apr 22, 2003
Messages
165
If memory serves me right, I've seen code or maybe a shortcut somewhere for inputting a date value in a form along the following lines.
'
To input today's date, input "0"
Yesterday = "-1"
A week ago = "-7"

and so on.


Any ideas?
 

David R

I know a few things...
Local time
Today, 12:16
Joined
Oct 23, 2001
Messages
2,633
Not a clue. In any Access form, Ctrl+; will input today's date, but i don't know of shortcuts for the others.

You could do it via code, but why not just use the DatePicker?
 

sdawson

Registered User.
Local time
Today, 18:16
Joined
Apr 22, 2003
Messages
165
As I understand it, Datepicker is normally set with Onload when opening a form. I require a to input a variety of dates when the form is open.
I'll look at some code then.

Thanks
 

sdawson

Registered User.
Local time
Today, 18:16
Joined
Apr 22, 2003
Messages
165
In plain English............

To input today's date, input "0"
Yesterday = "-1"
A week ago = "-7"

and so on.
 

David R

I know a few things...
Local time
Today, 12:16
Joined
Oct 23, 2001
Messages
2,633
Not plain enough.

WHY do you want today's date to be zero, rather than Date() automatically prompted?
WHAT do you want to do with a day ago, and a week ago, and why can't they be autocalculated from the first datefield?

We're trying to help you. Help us help you by giving us good information in your question.
 

sdawson

Registered User.
Local time
Today, 18:16
Joined
Apr 22, 2003
Messages
165
OK, here we go.

If the user wants to input today's date, they would in put "0". The date field would then be populated with today's date. The user would then carry on inputing data.

The user would then move onto the next record. This requires yesterday's date to be entered so the operator would input "-1" and the date field would be populated with yesterday's date. And so on.
Basically the calculation is as you say, Today()-0, or Today()-1 in the example above.

I am trying to speed up data input. Picking a date from a popup calender or typing in a date is to slow.

I know I've seen this a few years ago in another db. I guess, it is some coding based on Today() as you say.
 

Users who are viewing this thread

Top Bottom