Solved

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

Posted on 2014-11-24
2
353 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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