Results 1 to 4 of 4
  1. #1
    cp3 is offline Novice
    Windows 10 Access 2021
    Join Date
    Mar 2023
    Posts
    13

    Query Criteria


    Hello! I am just starting out learning access and I want to create a query for a dataset with particular criteria. I want to run it monthly and want to select for records where a particular category is missing for that month. For example, if a record didn't have data input for a particular column (but might have data in other columns) in that month, I want to be able pull all the records with this criteria each month when I check on it. Thank you for all your expertise and help!

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    no information provided to provide a focused answer but perhaps something like

    Code:
    SELECT *
    FROM myTable
    WHERE myField is null

  3. #3
    cp3 is offline Novice
    Windows 10 Access 2021
    Join Date
    Mar 2023
    Posts
    13
    ah yes sorry maybe I didnt explain it well enough. I was wondering if there is a particular code I can write in the criteria box when i create a new query that can select all of the records with a missing value in a particular column for that current month. So it only selects the records with missing for the month during which the query is ran. Is there a way to make it pull this for the current month without needing to manually select the current month?

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Yes. Use the month() and year() functions.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 2
    Last Post: 04-02-2015, 12:45 PM
  2. Replies: 1
    Last Post: 11-13-2014, 11:34 PM
  3. Replies: 4
    Last Post: 08-30-2014, 10:23 AM
  4. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  5. Replies: 1
    Last Post: 07-13-2011, 11:00 AM

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