Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date inputs

Status
Not open for further replies.

Dibblet

Technical User
Jul 14, 2005
20
GB
On a form text box that contains a date I would like "dd/mm/yyyy" to appear in the text box as an input mask.

How do I make this happen?
 
Properties of the textbox, go to data tab and set the inputmask there.

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
Even if you did this, it would have no effect on how the date would be interpreted by Access.
Why not let the user enter the date any way they want to and just format it as "dd/mm/yyyy" (or better, as "dd/mmm/yyyy", so that there is no confusion between day and month)
 
It is not clear it is a date. So I would like 'dd/mm/yyyy' to appear in the text box to prompt the user.

Can this be done?
 
Why don't you confirm what data type it is?

________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
I have done. I would like the text box to have 'dd/mm/yyyy' written in it when I move to it.
I would then like to to enter the date and have it appear instead of the 'dd/mm/yyyy' is it possible to do this?
 
You may look into CDate Function

from help file
Dim MyDate, MyShortDate, MyTime, MyShortTime
MyDate = "February 12, 1969" ' Define date.
MyShortDate = CDate(MyDate) ' Convert to Date data type.

MyTime = "4:35:47 PM" ' Define time.
MyShortTime = CDate(MyTime) ' Convert to Date data type.


or
FormatDate Function

FormatDateTime(Date[,NamedFormat])



________________________________________________________________________
Zameer Abdulla
Visit Me
Children are poor men's riches.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top