0

I apologize in advance if this question has already been asked. I searched, but did not find an answer to my particular problem:

I have a [Date Entry] field in my 2013 Access database, and I'm trying to add a calculated field to calculate the next Friday of the same week as the [Date Entry] field. I've followed the instructions I've found on numerous postings that say to either click on the empty field and select Calculated Field or by going to the Fields tab in the ribbon under the section Add and Delete and select More Fields.

None of these brings up the Expression Builder. Could it be because I have the DB saved as a MDB?

If that is the problem, does anyone have a solution for having Access automatically calculate the current week'S Friday?

Thanks in advance.

viRg
  • 95
  • 1
  • 11

1 Answers1

0

Fairly common topic, examples all over the web.

Review: Get Monday Current Week

Adjust expression for whatever day you want. For Friday, try:

DateAdd("d", 5 - Weekday(Date(),2), Date())

If you want to return the Friday of the week a date in a record falls in, use that date field in place of Date().

If you are trying to add a calculated field to a table in MDB, cannot do that. Calculated field introduced with ACCDB. Also, calculated field will recognize very few functions. Do this calc in query or textbox.

Community
  • 1
  • 1
June7
  • 19,874
  • 8
  • 24
  • 34
  • Thanks @June7. I saved my DB as a ACCDB and can now add the calculated field. I'm now searching for a way to extract information from Excel using DAO. – viRg Apr 24 '17 at 13:40
  • Many examples in forum and out on web. Here is one http://www.accessmvp.com/KDSnell/EXCEL_Import.htm#WriteFileRst. If an answer resolves your issue would be nice to mark it accepted. – June7 Apr 24 '17 at 16:44