Results 1 to 4 of 4
  1. #1
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Prompt asking for date or "too complicated" error

    Good morning!



    I am using the following in a query. It prompts me to enter the date, if I do, I get data, if I don't I get the "expression is too complicated" error.

    Code:
    AsmtNote: IIf([trimmedasmt]="roads",Format(DateSerial(Year([forms]![runsassessments]![daterun]),Month([Forms]![runassessments]![DateRun])+4,1),"yyyy ") & ([trimmedasmt] & "Asmt" & " Lot" & " " & [lotnumber_fk]),Format(DateSerial(Year([Forms]![runassessments]![DateRun]),Month([Forms]![runassessments]![DateRun])+2,1),"mmm yyyy ") & ([trimmedasmt] & "Asmt" & " Lot" & " " & [lotnumber_fk])).
    When I get data it is correct: Apr 2019 Monthly Asmt Lot 0373

    I cannot see where there is a problem with the statement, can any of you? Or is there somewhere else I should be looking? The RunAssessments form is open with the date run entered. TIA!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    This is flagged as solved; is it? If not, what exactly is the prompt? That will tell you what it can't find.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Gina Maylone is offline Always learning
    Windows 10 Access 2016
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544
    Quote Originally Posted by pbaldy View Post
    This is flagged as solved; is it? If not, what exactly is the prompt? That will tell you what it can't find.
    Yes, I solved it, rewrote it without the extra space! AHHHH! Sometimes I can be such an amateur. :-) Have a good one Paul!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Great! Have a good rest of the weekend.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-06-2018, 08:26 PM
  2. Replies: 3
    Last Post: 02-16-2015, 01:04 PM
  3. Replies: 3
    Last Post: 12-06-2014, 03:59 AM
  4. Replies: 2
    Last Post: 09-29-2012, 11:22 PM
  5. Replies: 1
    Last Post: 12-11-2008, 01:28 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums