Solved

Self-completing date textboxes

Posted on 2007-11-24
4
246 Views
Last Modified: 2013-11-27
Hello, I am porting an old Access / VBA application to Visual Basic .NET.

Access had a very useful function which I can't in .NET, the format/Input mask.
Basically if I put "dd/mm/yyyy" as format and "99/99/99;0;_" as input mask everything the user will have to do it to type something like "030579" (the control in the meanwhile will automatically show __/__/____ on the textbox) and the system will complete it for him: it will become 03/05/1979.

Is there anything similar in Visual Basic .Net?
0
Comment
Question by:Emanuele_Ciriachi
  • 2
  • 2
4 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20343659
There is a .net control called MaskedTextBox, have you seen it?
http://msdn2.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx
0
 
LVL 1

Author Comment

by:Emanuele_Ciriachi
ID: 20343684
Wow, looke exactly what I need!

Any chance that you can show me how to use it for my goal, e.g. to accept dates comprised only of 6 numbers?
I could do all of this by myself, in this case the answer would be good but not excellent.
0
 
LVL 1

Author Comment

by:Emanuele_Ciriachi
ID: 20343685
Typo: looke --> looks
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20343734
Set the mask to: "00/00/0000" and the PromptChar to: "_"
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question