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
193 Views
Last Modified: 2014-12-03
I am trying to get the Current Date on an Access2013 Form.
0
Comment
Question by:Frank Vertin
  • 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 49

Expert Comment

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

=Date()

/gustav
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

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

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 - Access MVP) earned 500 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

813 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now