Results 1 to 10 of 10
  1. #1
    NOTLguy is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Sep 2010
    Posts
    60

    Date Paramater prints weird

    Good day,

    I have created a report from a query that has two parameters. They represent [Enter Starting Date] and [Enter Ending Date] to make the report quarterly. The parameters are of Date Type. In the report header I included the following in a text box:

    ="Covering Period Starting" & [Enter Starting Date] & "To" & [Enter Ending Date]

    When I run the report, the dates appear differently to each other.

    Covering Period Starting 07/01/2010 To 30/09/2010

    Any thoughts as to why and how to correct the second date?



    Thanks
    Bill

  2. #2
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Almost looks like Format was used on the 2nd date. If you run the underlying query, is it displayed the same way?

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Maybe you entered "07/01/2010" and "30/09/2010", so the report show exactly what you typed in ?

  4. #4
    NOTLguy is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Sep 2010
    Posts
    60
    Quote Originally Posted by slave138 View Post
    Almost looks like Format was used on the 2nd date. If you run the underlying query, is it displayed the same way?
    I ran the underlying query with the parameters as follows:

    Enter Beginning Date 09/01/10
    Enter Ending Date 10/19/10

    The SQL for the query is as follows:

    PARAMETERS [Enter Beginning Date] DateTime, [Enter Ending Date] DateTime;
    SELECT Hours.HoursId, Hours.ClientID, Volunteers.FirstName, Volunteers.LastName, Hours.FacilityID, Hours.CodeId, Hours.Minutes, Hours.VolunteerID, Codes.Description, Codes.Title, Hours.Date, Round(([minutes]/60),2) AS Expr1, Codes.PrimaryCode, Codes.SecondaryCode
    FROM Codes INNER JOIN (Volunteers INNER JOIN Hours ON Volunteers.VolunteerID = Hours.VolunteerID) ON Codes.CodeId = Hours.CodeId
    WHERE (((Hours.Date) Between [Enter Beginning Date] And [Enter Ending Date]));


    The field Hours.Date is a data type Date/Time

    Bill

  5. #5
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    I'll admit I don't usually use parameters in a query like this, but when I try to replicate the code I don't get any output for [Enter Beginning Date] or [Enter Ending Date]. So how are you pulling that info into the report?

  6. #6
    NOTLguy is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Sep 2010
    Posts
    60
    Quote Originally Posted by slave138 View Post
    I'll admit I don't usually use parameters in a query like this, but when I try to replicate the code I don't get any output for [Enter Beginning Date] or [Enter Ending Date]. So how are you pulling that info into the report?
    In the report Header I have a Text Box with the control source being:

    ="Covering" & [Enter Beginning Date] & "To" & [Enter Ending Date]

    The report is built using the query.

    Bill

  7. #7
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    I guess I would have to see it in action because I can't replicate the problem as it is described.

  8. #8
    NOTLguy is offline Advanced Beginner
    Windows XP Access 2002
    Join Date
    Sep 2010
    Posts
    60
    Quote Originally Posted by slave138 View Post
    I guess I would have to see it in action because I can't replicate the problem as it is described.
    I am using Access 2002. Does that mean anything in this regard?

    Bill

  9. #9
    slave138's Avatar
    slave138 is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Oct 2010
    Location
    WI
    Posts
    233
    Quote Originally Posted by NOTLguy View Post
    I am using Access 2002. Does that mean anything in this regard?

    Bill
    Shouldn't matter in this case.

  10. #10
    LillMcGill is offline Dagny fan
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Oct 2010
    Location
    Southern USA
    Posts
    70
    That is a weird problem. If I were you, I'd try renaming the field Hours.Date... something besides "Date". Date is a reserved word and should not be used as a field name.

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

Similar Threads

  1. Replies: 1
    Last Post: 08-03-2010, 11:56 AM
  2. Weird Query results
    By UCBFireCenter in forum Queries
    Replies: 0
    Last Post: 10-06-2009, 03:38 PM
  3. I need help with weird stuff happening on a DB
    By makotoshishio in forum Access
    Replies: 9
    Last Post: 04-02-2009, 12:20 PM
  4. Report Prints Out Before Previewing
    By Schwagr in forum Reports
    Replies: 2
    Last Post: 03-18-2006, 02:15 PM
  5. Get the sum of decimal values - weird results
    By BengtCarlsson in forum Queries
    Replies: 2
    Last Post: 02-10-2006, 04:29 PM

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