473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Input mask for date on textbox

hello All..

I am currently working on an issue that contains the following

I have an Access Form on which 2 textboxes are used to let the user select 2 dates. These two dates are used to make a selection. When it starts up, it gives the date in European standard.. (dd/mm/yyyy) but when the user wants to type in another date, the value in the textbox jumps to American date standard (mm/dd/yyyy) How can i make sure that the textbox ALWAYS uses the European standard
Jun 10 '11 #1
8 6623
Frinavale
9,735 Expert Mod 8TB
You may be interested in checking out the topics of Globalization and Localization.

-Frinny
Jun 10 '11 #2
NeoPa
32,556 Expert Mod 16PB
There is a format property of the TextBox control. Assuming you don't have any code that sets the value explicitly (and I'm sure you would have told us if you had) this should ensure the format is consistent.
Jun 10 '11 #3
I am using the format property of the TextBox Control, the value of this format property = dd/mm/yyyy. this is the only thing i'm using to se the format. As NeoPa assumed, i am not using any code otherwise

I made some images of the textbox and will put them here..

When the form loads the value of the second textbox = current date. This shows correct.



Then I fill in another value, in this example i have used the 12th of May



So far still good, but when i leave the textbox to click a button or change the value of another textbox, the following shows



Then when i click the second textbox again, it does show the date in the correct order (so day/month/year) but the leading zero's are removed.

Jun 14 '11 #4
NeoPa
32,556 Expert Mod 16PB
This is an interesting problem. The answer may be here but it is certainly not obvious to me without the database. If you can, post the database (Attach Database (or other work)) and I'll look at it for you and see if I can determine what the problem is.
Jun 14 '11 #5
I'll see if i can post the access application this weekend, it will take some time to clear it of anything that would be useless to you
Jun 16 '11 #6
Did you check the Date-Format in the Regioonal Settings in Control Panel. You may set the Date format there to match the European format.
Jun 16 '11 #7
I just tried it, and at first sight it does seem to work, day and month aren't switched around.. Unfortunatly this gives me several problems on other areas in the code and outside the code, so this i'll have to take some time to see what is effected by this

Thank you very much. I hope there will be other solutions that can fix the problem without too many changes to other systems. Otherwise i'll have to do a lot of work :)
Jun 16 '11 #8
NeoPa
32,556 Expert Mod 16PB
Dopey Fletcher:
I'll see if i can post the access application this weekend, it will take some time to clear it of anything that would be useless to you
There's a balance to be struck. Strip out what you can easily. If there's stuff which will be complicated to strip out, and which doesn't make the situation difficult, then leave it. Always test that it exhibits the symptoms before attaching though.

PS. I've added an extra post to that thread with some code that may help if dealing with a large and/or complex database.
Jun 16 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Miranda Evans | last post by:
In my application, a text box control resides in a form. The text box control is unbound, but--assuming all edits are passed when the user click a command button on the form--the contents of the...
2
by: johnp | last post by:
Hi, Our Tech department updated users to Office 2003 this week. Now the input mask in one of the applications is showing up as: (###) ###-### The input mask wizard works correctly when I...
1
by: Tony | last post by:
Hello everyone... Just wondering is it possible to have input mask in a textbox control? i want my phone number textbox to force the user to enter in this format (__) ____ ____ Is there any way...
1
by: msnews.microsoft.com | last post by:
How can I set input mask on TextBox control, like if I want to input "(999) 999-99-99"?
9
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox? Or can I use for mask input some other control?
2
by: msnews.microsoft.com | last post by:
Hello. How can I set input mask for TextBox in Windows Form? For example I want to mask (format) TextBox for inputing phone number like (999) 999-99-99. The TextBox must first show something like...
0
by: Christian | last post by:
Hi all, on a PocketPC 2003 dialog I want the user to enter an IP-Adress using a TextBox control. Within the TextBox control I would like to display an predefined input mask like xxx.xxx.xxx.xxx ...
1
by: Brian Ciarcia | last post by:
Can someone please look at the following code that I have been using for my asp forms and help me convert it so that I can use it on my .net forms?? I have tried using the maskedit control and...
1
by: Doug | last post by:
Hi, I created a short date field. The format is dd/mm/yyyy when displayed. The input mask is set to 99/99/00;0 (default, I didn't type anything). If I edit an existing date, say change...
2
by: rajeevs | last post by:
Hi I would like to request your great help for completeing my database to have an input mask for a field in form as dd-mmm-yy hh:nn That is Medium date space space and short time Any help...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.