Question DataType - Date/Time

qiqinuinaifen128

Registered User.
Local time
Yesterday, 16:24
Joined
Dec 21, 2008
Messages
29
[Resolve] DataType - Date/Time

Hi,

I have a field and the i had set the field's data type to Date/Time.
Inside my form, user can choose the date in a textbox. I hope to automatic display the day(monday, tuesday...) on another textbox when the user select a date in the calender. May i how should i do?

I'd appreciate for you assistance^^.
 
Last edited:
Look up the following functions in Access Help. Weekday, Cdate.
 
How about the Format Rabbie?? Format will do nicely, wont it?
 
How about the Format Rabbie?? Format will do nicely, wont it?
Of course. I was just trying to encourage people to use Access Help and other sources of info before posting. Searching this forum is always a good idea. Most common problems have been answered here many times.:)
 
I got the answer^^

Below is the code

Code:
Me.txtdisplaytheday = WeekdayName(Weekday(Me.txt_date))
 
Why not simply use format??
Format(Date,"DDDD")

Weekdayname works offcourse, but format is so much more powerfull....
 
Why not simply use format??
Format(Date,"DDDD")

Weekdayname works offcourse, but format is so much more powerfull....

I'm a very beginner access learner ^^, don't know much about code.
Thank you for provide me another solution.
 
Why not simply use format??
Format(Date,"DDDD")

Weekdayname works offcourse, but format is so much more powerfull....

Actually i have another similar question

I have a dat/time field in the table. In the userform, i have a textbox which let the user to select data in this textbox and key in the time.
But sometime the user after select the date and forget to key in the timing
Do you know how to prevent this careless?
 
Presuming you have like a save button or something for the user to use, you can validate the data entry at that time.

Check for valid entries and/or to have values in certain fields.
 
Presuming you have like a save button or something for the user to use, you can validate the data entry at that time.

Check for valid entries and/or to have values in certain fields.

When the user select the date, the text box will appear the date like "12/12/2009", the correct entry should be include timing like "12/12/2009 07:00:00AM". Can i check weather the char is more than 13 if not prompt an msgbox to notified the user
 
any date field has by default 00:00:00 am attached to it... if that is an invalid value, then yes...

Format again will save the day. Read the help
 

Users who are viewing this thread

Back
Top Bottom