Results 1 to 2 of 2
  1. #1
    pekimojoe is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    2

    Help with delete query please

    i want to create a delete query that deletes a row if a date is before a certain time... EXCEPT for when the date value is null...

    I have the deletion of the dates correct and fine but cant work out how to make an exception in the criteria for blank fields...

    For example my criteria is: Where; <=#30/04/2016# EXCEPT if value IS NULL...

    I have tried putting a second criteria of "IS NOT NULL" but it still wants to delete everything.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If the date value is null then it does not meet the criteria and record will not delete. At least that's what happens for me.

    Your date is in international format. That might be an issue. Review http://allenbrowne.com/ser-36.html

    However, don't see how that can contribute to records with Null deleting.

    Post the full SQL statement.
    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.

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

Similar Threads

  1. Delete Button vs. Delete Query
    By JennyL in forum Access
    Replies: 4
    Last Post: 02-11-2017, 10:11 PM
  2. Replies: 4
    Last Post: 12-13-2016, 09:48 AM
  3. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  4. Trying to Delete record using delete query
    By MooseOTL in forum Access
    Replies: 13
    Last Post: 10-04-2011, 02:30 AM
  5. Replies: 11
    Last Post: 03-30-2011, 01:08 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