Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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?

Posted on 2014-10-22
7
Medium Priority
?
201 Views
Last Modified: 2014-12-03
I am trying to get the Current Date on an Access2013 Form.
0
Comment
Question by:Frank Vertin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 75
ID: 40397678
Dim dDate as Date
dDate = Now()

mx
0
 
LVL 75
ID: 40397680
OR

Dim dDate as Date
dDate = Date()

for just the Date w/o Time
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 40397805
Or, for a direct display in a textbox, use this expression:

=Date()

/gustav
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 75
ID: 40397822
Would have posted that, but OP said 'variable' ... but good for OP to know anyway :-)
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 40397830
Yes. It was to have "appear" covered ... variables normally don't step forward.

/gustav
0
 

Author Comment

by:Frank Vertin
ID: 40414167
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
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 40414238
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

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question