Results 1 to 2 of 2

Thread: Query

  1. #1
    Join Date
    Jun 2012
    Posts
    85

    Unanswered: Query

    Hello,
    I have a Query the i need to update a table. Now my one table has the following fields:
    ID
    Name
    Date
    Return

    Now i need the date and return to update from another table with these fields:
    ID
    Name
    Month
    Year (I know year is an important word in access)
    Return

    I need to group the Month and year into one field from this past table. I have been trying to use a query but i cant get them to group to give the month end date. I am able to get it to group like this, for example. May, 2004.
    Is there a way to get the year, and month to group in this format dd/mm/yyyy? It needs to be the last day of the every month. any ideas, thanks!
    Mike
    ________

  2. #2
    Join Date
    Jun 2012
    Posts
    85
    So i have figure out that i need to use the DateSerial formula. I currently have this:

    DateSerial([Year],[Month]+1,0)

    the reason i have plus one is to tell access to go to the beginning of next month, then i have the day set as zero to go to the last day of the previous month. This helps avoid confusion with how many days are in a month etc. does anyone have an idea why i keep getting #error? I have been tried linking it to the table its self ie. ([Monthly_Performance].[Year],[Monthly_Performance].[Month]+1,0)
    However it is still not working. I have data that doesnt equal zero at all? so how is it giving me a div/o error? thanks,
    Last edited by Mike02; 07-02-12 at 16:50.
    Mike
    ________

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •