PC Review


Reply
Thread Tools Rate Thread

Dates: Entering Without Having To Type Slashes?

 
 
(PeteCresswell)
Guest
Posts: n/a
 
      16th Oct 2006
Anybody got a way to let users type a date into a textbox without having to
enter the slashes, BUT, also allow the user to enter slashes?

I'm guessing it's some VBA code that counts characters and drops in the
slash.... but if somebody's already invented this particular wheel....
--
PeteCresswell
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      16th Oct 2006
(PeteCresswell) wrote:
> Anybody got a way to let users type a date into a textbox without
> having to enter the slashes, BUT, also allow the user to enter
> slashes?
>
> I'm guessing it's some VBA code that counts characters and drops in
> the slash.... but if somebody's already invented this particular
> wheel....


Use an InputMask.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
(PeteCresswell)
Guest
Posts: n/a
 
      16th Oct 2006
Per Rick Brandt:
>> I'm guessing it's some VBA code that counts characters and drops in
>> the slash.... but if somebody's already invented this particular
>> wheel....

>
>Use an InputMask.


Yeah, I guess anything else is trying to fool Mother Nature.... I was trolling
for something that would let the user type "152006" or even "156" and have it be
smart enough to return "01/05/2006".
--
PeteCresswell
 
Reply With Quote
 
Bill Mosca, MS Access MVP
Guest
Posts: n/a
 
      16th Oct 2006
Pete

An input mask isn't very forgiving when it comes to the number of digits
required if you go over that number like entering 2006 when a mask is
looking for 06.

When I set up textboxes for dates I use a short date. 99/99/0000;0;_

IMHO, users should be pretty used to 4-digit years by now. If not, too bad.
Typing a slash will get the cursor over to the next slot. The year is the
only one that must have 4 digits.

Trying to code for turning sloppy data entry into correct data is fighting a
losing battle. How do you know what the user intended? And what user could
expect 156 to be interpretted as 1/5/2006?

--
Bill Mosca, MS Access MVP


"(PeteCresswell)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Per Rick Brandt:
>>> I'm guessing it's some VBA code that counts characters and drops in
>>> the slash.... but if somebody's already invented this particular
>>> wheel....

>>
>>Use an InputMask.

>
> Yeah, I guess anything else is trying to fool Mother Nature.... I was
> trolling
> for something that would let the user type "152006" or even "156" and have
> it be
> smart enough to return "01/05/2006".
> --
> PeteCresswell



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      16th Oct 2006
"(PeteCresswell)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Per Rick Brandt:
>>> I'm guessing it's some VBA code that counts characters and drops in
>>> the slash.... but if somebody's already invented this particular
>>> wheel....

>>
>>Use an InputMask.

>
> Yeah, I guess anything else is trying to fool Mother Nature.... I was
> trolling
> for something that would let the user type "152006" or even "156" and have
> it be
> smart enough to return "01/05/2006".


You could always put code in the BeforeUpdate event to reformat it, but I
have no idea how you'd get it to recognize 1232006 as 01/23/2006 and not
12/03/2006 (or vice versa)!

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering dates without slashes Bob Spencer Microsoft Excel Discussion 3 25th Oct 2007 06:29 PM
Entering dates without having to use slashes? =?Utf-8?B?Si5HLk1hcnRpbg==?= Microsoft Excel Misc 2 1st Nov 2006 07:35 PM
Excel Dates w/ No Slashes =?Utf-8?B?U0RveWxlQENBSW5j?= Microsoft Excel Worksheet Functions 3 26th Sep 2006 09:25 PM
Entering DATEs in EXCEL should not require use of "/" slashes. =?Utf-8?B?UmVjZXB0aW9uaXN0?= Microsoft Excel Misc 1 12th Sep 2005 05:11 PM
Entering Dates Without Slashes Matt Microsoft Excel Worksheet Functions 4 12th Dec 2003 03:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:54 AM.