Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    98

    Unanswered: Error message date

    I have no idea why I keep getting this error message so I hope that you guys can help.

    When I make a query to group by a month I get the following message:
    "This function is not available in expressions"

    THe SQL I use is:
    SELECT DISTINCTROW Format$([tblMelding].[Datum_nu],"mmmm yyyy") AS [Datum_nu per maand], Sum(tblMelding.DomeinID) AS [Som Van DomeinID]
    FROM tblMelding
    GROUP BY Format$([tblMelding].[Datum_nu],"mmmm yyyy"), Year([tblMelding].[Datum_nu])*12+DatePart("m",[tblMelding].[Datum_nu])-1;


    Am I doing something wrong? Maybe a setting somewhere?

  2. #2
    Join Date
    Jun 2004
    Location
    Terrapin Nation
    Posts
    205
    try not using the format function in the grouping.

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Do you use Acce$$ 2003?
    Once, my query has run correctly under Acce$$97, then tried it out on Acce§§ 2003, it gave me the same message?

  4. #4
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    98
    I tried exporting some tables to a new (clean) db and the queries worked like a charm. I dont know what or why. Do you think I should export all the tables and forms etc. to this new db or will the same problem arise?

    Any ideas on why this error ocurred?.

Posting Permissions

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