Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-24
2
Medium Priority
?
376 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

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…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
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…

730 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