?
Solved

Calculated date field question

Posted on 2013-11-24
2
Medium Priority
?
438 Views
Last Modified: 2013-11-24
I have a field in a form named "ListDate".  It is a date/time field with short date as the format.

After an entry has been made in this field I want two other fields to be calculated.

One is named "ListMonth".  The other is named "ListYear".  So using this entered date as an example...

08/30/2013

I want the first calculated date field, "ListMonth", to be 08
and
I want the other calculated date field, "ListYear" to be 2013.

How can I do this or what is the expression and/or format in the table designer?
0
Comment
Question by:SteveL13
  • 2
2 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 39672921
You could use these expressions:

= Format(Month(ListDate), "00")

= Year(ListDate)
0
 
LVL 61

Accepted Solution

by:
mbizup earned 2000 total points
ID: 39672926
That said, I would use those as expressions in queries rather than calculated fields in your table.

The reason being that calculated fields are specific to certain versions of Access wheras those query expressions are more generic.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Suggested Courses

830 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