Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to handle entry of dates?

How to handle entry of dates?

How to handle entry of dates?

I'm reluctant to use the Masked Edit control because of lack of uniforminty of available events compared with other entry controls.

Need to accomodate entry of 2 digit years, then display back in 4 digit years, then allow change of 4 digit year. would prefer allowing entry of /s but not require them.

RE: How to handle entry of dates?

Did you try the Data Picker control?

RE: How to handle entry of dates?


I'm not, I admit, familiar with the Masked Edit event model but wuold it be possible to wrap in your own control which *would* have the standard events?


RE: How to handle entry of dates?

VB400, I like the Date Picker control a lot. However, I need to intercept keystrokes and know what part of the date they are from.

Mike, It looks like we may have to create our own control. I had hoped to find someone who had already done the work. Maybe someone will be able to use ours when we build it. The reason we need to intercept the keystrokes is that we trap all Enters and substitute tabs (so that speed entry users don't have to reach for the Tab key or use the mouse.

Some 3rd party controls look good but we are preparing to market to VARs and don't want to clutter things up with requirements for them to need to buy too much other stuff.

RE: How to handle entry of dates?

Eh? Why not use the built-in VB functions? You can't sell something that's availible for free. (Now that you bought it.)

Johnk, don't get hooked on controls. You can't get much help from the current version (the CD is N/A).

RE: How to handle entry of dates?

Agree with you about 3rd party controls - avoid them like the plague.

RE: How to handle entry of dates?

Try something like;

Private Sub Text1_LostFocus()
Text1 = Format(Text1, "mm/dd/yyyy")
End Sub

Check for errors with IsDate and others.

See you on 1/1/0

RE: How to handle entry of dates?

Simple is good. This is a bad time to introduce complex solutions. Take it from someone who had to "simplify" more than a million lines of code.

RE: How to handle entry of dates?

Alt255, Thanks for the reminder to keep it simple. I strongly agree. In today's distributed architectures simple (pure) design is required for survival.

Our issue with entry of dates is to keep it simple, intuitive and efficient for a wide variety of users. Sometimes we choose to trade off complexity in coding for simplicity for users.

Mike, We also strictly limit our use of 3rd party controls. We used several in VB4 that were not available for VB5. After much frustration with MS Grid we selected the grid from Apex, and have been very pleased. We also use Appointment Scheduling controls from DPI Technologies. In both cases these companies are suppliers to Microsoft.

Thanks to all for your input.

John K

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close