Date/Time default value, can it be an expression?

joe55555

Registered User.
Local time
Today, 12:50
Joined
Jul 19, 2013
Messages
11
hello,

when adding a new record i want to appear in the Date/Time field the following format "MM/DD/YYYY" as its Default Value

i don't want it to appear when i click on it, i did this using input mask

I just want the default value to show like "MM/DD/YYYY" when a new record is added and the user choose a date it becomes the date he chose.

Thank you
 
I think you can put VBA in the form's OnLoad event that says
If me.newrecord then
mydatefield=Date()
end if
 
i was thinking about something but i don't know if it can work.

if i add vba code testing if the filed Date/Time of the table is empty so this shows a Label "MM/DD/YYYY" on the TextBox in the Form
and if the field Date/Time of the table is not empty, so this will hide the label "MM/DD/YYYY" and the Date will appear in the textbox in the Form

is this possible to do ? if yes, can anyone please give me a hint of the code !?

thank you
 

Users who are viewing this thread

Back
Top Bottom