In Access 2013, How can I get current Date to appear on a form in a variable that I could use both for reference for date calculations?

I am trying to get the Current Date on an Access2013 Form.
Frank VertinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Dim dDate as Date
dDate = Now()

mx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
OR

Dim dDate as Date
dDate = Date()

for just the Date w/o Time
0
Gustav BrockCIOCommented:
Or, for a direct display in a textbox, use this expression:

=Date()

/gustav
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Would have posted that, but OP said 'variable' ... but good for OP to know anyway :-)
0
Gustav BrockCIOCommented:
Yes. It was to have "appear" covered ... variables normally don't step forward.

/gustav
0
Frank VertinAuthor Commented:
I tried the simple one,  "=Date()" and got the error posted when I put it in the field in design mode. It came when I changed to Form mode. Am I not doing it right?
Error-by-date.docx
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Where exactly did you put that?

If in the Control Source property for a Text box on a Form ... you would just have:

=Date()

No double quotes ....
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.