Results 1 to 6 of 6
  1. #1
    krkow is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    14

    Update the date in present month

    HI,



    I have created the query which selects the "DateCapture" in every month. (I only check the data above <95 %).

    My query has a few columns :

    Name Country Date DataCapture

    When I'm going to check if the data are above 95% in every month

    (mostly after completing previous month I check the data are in required range) by typing the date manually e.g 2011-10-01.

    Is it possibile to set automatically the date typing?

    I thought that the date to my query might be taken from system, but the format must be simillar, meaning yyyy-mm-dd (always 01)

    Do you know how it can be set in sql?
    BR

    kk

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Can you explain a little more clearly what you need your query to do?

    Are you just trying to get data for the previous month?

  3. #3
    krkow is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    14
    I get the data every month and compare how many of the is completed. ( if the data have 100%.

    In my query there is one column with date. In every month I have to put by manually the date for last month. e.g now we have 01-11-2011 and I would like to see the data for 01-10-2011.

  4. #4
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I think what you need to do is create a query with all the fields from your table that you need to see - and then - in the 'Criteria' row for your Date field - put something like this:
    Code:
     
    Between DateSerial(Year(Date()),Month(Date())-1,1) And DateSerial(Year(Date()),Month(Date()),0)
    This will give you only records with dates in the previous month.

    Let me know if that works.

  5. #5
    krkow is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    14
    HI

    Yes it works, THANK YOU

  6. #6
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    I'm glad I could help!
    Mark it Solved if you haven't done that already!

    All the best!

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

Similar Threads

  1. date to month
    By metokushika in forum Access
    Replies: 5
    Last Post: 11-29-2011, 09:37 AM
  2. Month/Month to date
    By Tony McGuire in forum Queries
    Replies: 9
    Last Post: 09-20-2011, 11:54 AM
  3. Update Query Dependent on the month
    By hawkins in forum Queries
    Replies: 3
    Last Post: 07-12-2011, 08:54 AM
  4. present date in data field
    By johnkl49 in forum Access
    Replies: 2
    Last Post: 09-14-2009, 04:18 PM
  5. Replies: 2
    Last Post: 07-31-2009, 06:56 AM

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