Results 1 to 4 of 4
  1. #1
    AndyC121 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    37

    Query stopped working

    I have two tables: Calibrated Equipment and Maintenance and cleaning. All was working fine on my queries then Monthly calibrated equipment query stopped working. Nothing had changed except a couple of dates in the table which were updated.

    Here is my query: SELECT [Calibrated Equipment].ID1, [Calibrated Equipment].[Equipment Description], [Calibrated Equipment].[Serial No:], [Calibrated Equipment].[Last Done Date], [Calibrated Equipment].[Due Date], [Calibrated Equipment].[Place of Storage], [Calibrated Equipment].Comments, [Calibrated Equipment].[Contractor or Replace]
    FROM [Calibrated Equipment]
    WHERE ((([Calibrated Equipment].[Due Date]) Between DateSerial(Year(Date()),Month(Date()),1) And DateSerial(Year(Date()),Month(Date())+1,0)));



    If I delete the query all records show okay? any idea's what has changed or gone wrong.

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    >>DateSerial(Year(Date()),Month(Date())+1,0))
    DateSerial takes a year, month and day. Why do you have 0 for the day?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    0 causes the calc to return last day of the month (28,29,30,31) as appropriate for the month.

    What does 'stopped working' mean - error message, wrong results, nothing happens?

    What do you mean by 'delete the query all records show' - delete query from where and show records where?

    Don't see anything wrong with query.

    If you want to provide db for analysis, follow instructions at bottom of my post.


    Advise no spaces or special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    Thanks June, didn't see this in the documentation. I guess it makes sense.

    Andy, if you change the dates in the table back, does the query start working again?

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

Similar Threads

  1. Subforms stopped working
    By Paul H in forum Forms
    Replies: 7
    Last Post: 06-17-2014, 09:50 AM
  2. URGENT - Code stopped working
    By RachelBedi in forum Forms
    Replies: 2
    Last Post: 10-26-2012, 10:31 PM
  3. Access has stopped working
    By mrkaye in forum Access
    Replies: 0
    Last Post: 05-22-2012, 04:09 PM
  4. Access has stopped working
    By phillb in forum Forms
    Replies: 9
    Last Post: 01-10-2012, 12:22 PM
  5. All Buttons Stopped Working and...
    By rhoridge in forum Programming
    Replies: 1
    Last Post: 12-02-2010, 11:25 PM

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