David has attended:
Access Advanced course
Converting Text Value to a Date
Hi
I have a user input form made through vb which allows users to enter data in the form and then click a button and the data populates into the worksheet. This works fine except there is a text box field for a date. When the data is populated the date format comes out as mm/dd/yyyy in the worksheet. So when a user enter 10/01/1985 in the text box field it populates into the worksheets as 01/10/1985. Is there a way of changing the format so that it populates in the uk date format dd/mm/yyyy?
RE: Converting Text Value to a Date
Hi David
Thankyou for your question
My first impression is that the format of the cells into which the date value is being entered is causing the problem.
If you select the cells in question and click on Format-Cells-Number you will see the date format options.
You should first ensure that the location is set to English(UK), not English(US) and then choose the specific format that you need.
If this doesn't solve the problem, please let me know so we can explore other options
Regards
Stephen
RE: Converting Text Value to a Date
Thanks for the quick response Stephen. I have just tried this and it is still being populated in the format mm/dd/yyyy. I wonder whether in the vb code we have to specify the format?
RE: Converting Text Value to a Date
Hi David
I have just tried to replicate your problem using the method you describe, and my dates come out in the correct format.
There are a number of VB expressions that allow dates to be formatted in a particular way, but it is difficult give you precise advice without seeing the problem first hand.
Is it possible for you to email me a copy of the workbook? My email address is stephenATstl-training.co.uk
Regards
Stephen