Ms Access DateAdd() Help in Query to Avoid Parameter Prompts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Serenity1
    New Member
    • May 2019
    • 1

    Ms Access DateAdd() Help in Query to Avoid Parameter Prompts

    I am trying to determine a Term date. I am using a DateAdd function in a query. Formula. DateAdd(“m”, [termLength], [inservicedate]) the query accepts this formula but when I try to run it asks for parameters. I would just like this to be a calculated field. Any help would be greatly appreciated!!
    Last edited by NeoPa; May 21 '19, 02:13 AM. Reason: Added [ICODE] tags.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32662

    #2
    Well, to know where to look we'd need to know what parameter(s) it asks for.

    If the references within the square brackets [] should be resolved without the need for prompting the operator then they need to match Fields from the FROM clause of the query. I can only assume they don't, but more than that it's impossible to say without more information.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32662

      #3
      Also, it's hard to say for sure because some people actually type their code into a question instead of using Copy / Paste, but what you've used as quote characters in your code aren't actually quote characters at all - as you'll see now I've added the [ICODE] tags for you.

      Never use a word processor to work on code for exactly that reason. It will replace various important code characters with ones which only make sense visually - thus breaking your code.

      Comment

      • zmbd
        Recognized Expert Moderator Expert
        • Mar 2012
        • 5501

        #4
        Serenity1,
        More than likely, as Neopa states, there is a typo in your field names.
        If you would, let us take a peek at them by doing the following:
        Open your query in design view
        In the lower right hand corner of the access window you should see a series of icons, one of which should be "SQL" double left click
        You should see a bunch of text, most likely starting with the word "SELECT"
        Select (no pun :) ) all of the text in that window, copy, and paste it directly to this post
        Once inserted, select the text within the new post and click on the [CODE/] formatting tool to place the code tags Neopa mentioned above.

        Comment

        Working...