Link to home
Start Free TrialLog in
Avatar of shieldsco
shieldscoFlag for United States of America

asked on

Access 2013 Calculated Date Columns in Table

I have an access table that I'm trying to append to a SharePoint list. The SP list has two calculated columns:
 CurrentMonth: IIf(Str([Today])=Str([Due Date]),1,0)
 PastDue:IIf([Today]>[Due Date],1,0)

 What is the correct expression for my Access calculated columns?
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

try

CurrentMonth: IIf(Date()=[Due Date],1,0)
  PastDue:IIf(Date() >[Due Date],1,0)
Avatar of shieldsco

ASKER

Error Message :The expression cannot be used in a calculated table column
are your table in access db?
yes it's table expression
yes Access 2013 table
you have to do that in a query
Why not in a table as a calculated column
so you want to use data macro?
upload a copy of your db
in the expression to calculate the values for Calculated field, you can only use the fields on the same table and hard coded values,
values such as Date() are not permitted.

another way to achieve the goal is to use DataMacro, see this link for reference
https://msdn.microsoft.com/en-us/library/office/ff973807(v=office.14).aspx
Since I have no experience with Data Macros how would the following be created

 CurrentMonth: IIf(Str([Today])=Str([Due Date]),1,0)
  PastDue:IIf([Today]>[Due Date],1,0)
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial