Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Posts
    77

    Unanswered: How to generate a report based for a single month/ monthly

    Hi there

    I have a report that I want to be able to generate for a month, I have tried setting a parameter on the date field but I can only type in e.g. 16/06/04 in the parameter box which would give me reports for the 16th of the month only, I tried 1/06/04-30/06/04 to get the whole of June but it does not like the syntax.

    I also noticed that if a particular date had no report for that day it returned #error on the report. Is this right and if so is there a way to customized it to just be blank instead of the error message, which might be confusing to users. Any suggestions pls.

    Can anyone pls. help me on how to get the report for an entire month?

    Many Thanks for ur help in advance.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try between #01-06-04# AND #30-06-04#

  3. #3
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004
    Create parameters in your query. In the date field (if there is only one date field) enter this in the query:

    Between[BeginningDate] And [EndingDate]

    Also a Form created to search for you would be nice also. If I had time would do a sample for you, but keep checking if the above doesn't work well for you, but it should. What it will do is pop up a Dialog window with the words: BeginningDate and after you enter and click OK another pops up with EndingDate. When you click OK again it fetches the data. Note: whatever you place in the brackets will be asked of the user.
    So place the above in the Criteria field in the query.

    have a nice one,
    Bud

  4. #4
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122

    Exclamation

    Make a query that contains all the fields you use

    add this single condition

    Month([date field]) = Month(now())
    AND
    Year([date field]) = Month(now())

    Now set the datasource for your report to the new query rather than the table or whatever it was bound to before, you now have this months report to date.
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

  5. #5
    Join Date
    Sep 2003
    Location
    UK
    Posts
    122
    I know the SQL version is
    "Where Month([date field]) = Month(now()) AND Year([date field]) = Month(now())"
    if you are happy to edit the SQL directly (dropdown by the design/run button).
    Matt the Hat says: "what!?"
    A child of five could understand this! Fetch me a child of five!
    SCARY HARD CHALLENGE: http://www.dbforums.com/showthread.php?threadid=988682

  6. #6
    Join Date
    Apr 2004
    Posts
    77
    Hi guys

    Many Thanks for ur replies.

Posting Permissions

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