Solved

What's Wrong with My Access 2013 Web App Macro?

Posted on 2014-11-24
2
370 Views
Last Modified: 2014-11-24
I'm having trouble updating a text box that is formatted to accept a General Date in an Access 2013 Web App.  Here's what's supposed to happen.

1.  The user selects a term from the Term (Months) combo box.
2.  After the value in the combo box is updates (and assuming it is not empty), the macro is supposed to add the number of months selected in the combo box to the date/time value in the Effective Date field and enter the result of that calculation in the Expiration Date field.

Access is telling me that there's a problem with my DateAdd function in the macro however I see no problem with it.  Interestingly, Access stops telling me there's a problem if I remove the "=" sign from in front of the DateAdd function, however as you might expect that just causes the string "DateAdd(...)" to be placed in the Expiration Date field.

I'm attaching a couple of screenshots to help clarify this.

Any idea what I'm doing wrong here?
Thanks!
Capture-EffectiveDate.PNG
Capture-Term-AfterUpdateMacro.PNG
0
Comment
Question by:penlandt
[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
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
penlandt earned 0 total points
ID: 40463340
Found my own answer.  Apparently the syntax for the web app version of the DateAdd function is different than the desktop version.  Rather than using the "m" argument to represent "month", the function Month should be used instead:

WRONG:
=DateAdd("m",1,[txtEffectiveDate])

RIGHT:
=DateAdd(Month,1,[txtEffecitveDate])
0
 
LVL 1

Author Closing Comment

by:penlandt
ID: 40463341
Found my own answer.
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

615 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