Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Self-completing date textboxes

Posted on 2007-11-24
4
Medium Priority
?
272 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
[X]
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
  • 2
  • 2
4 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 2000 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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

721 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