Solved

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

Posted on 2014-11-24
2
317 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
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
penlandt earned 0 total points
Comment Utility
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
Comment Utility
Found my own answer.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

11 Experts available now in Live!

Get 1:1 Help Now