Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Self-completing date textboxes

Posted on 2007-11-24
4
251 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MkDir to create multiple folder and subfolder 2 39
Random times with 12/24 hour switching 9 27
IIF in access query 19 23
Groupbox Control ? 2 17
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

808 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