Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2004
    Location
    NC
    Posts
    5

    Red face Unanswered: Report..........Pls Help

    I need to create lot of reports that will be based on (sorted by) Month, week, and days. This is what i would like to do, but i don't know if its possible.

    I would like end user to select the report they want and then input date in "txtDateTo" and "txtDateFrom" and then click preview to print report. Basically i want report to be with the date rang that user have selected.

    Thanks In Advance

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Report..........Pls Help

    Originally posted by Desiguju2004
    I need to create lot of reports that will be based on (sorted by) Month, week, and days. This is what i would like to do, but i don't know if its possible.

    I would like end user to select the report they want and then input date in "txtDateTo" and "txtDateFrom" and then click preview to print report. Basically i want report to be with the date rang that user have selected.

    Thanks In Advance
    Yes ... It is possible.

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1

    Re: Report..........Pls Help

    Originally posted by M Owen
    Yes ... It is possible.
    I <3 U

  4. #4
    Join Date
    Apr 2004
    Location
    NC
    Posts
    5

    Re: Report..........Pls Help

    Originally posted by M Owen
    Yes ... It is possible.
    How ? Any example that i can see ? Any site where i can get more information about how to do this ?

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Report..........Pls Help

    Originally posted by Teddy
    I <3 U
    Huh????

    As for Desiguju2004's question: SEARCH this site ... Plenty of report examples abound ...

  6. #6
    Join Date
    Dec 2003
    Posts
    268

    More Info

    yes it is possible.... Lets expand on that......


    What you are trying to do is parameter query that drives a report. You can prompt the user to enter in some criteria that will be used to exclude/include information on a report.

    For the query for the respective report on the criteria line you can add
    between [Enter Start Date] AND [Enter End Date] and it will prompt the user for the dates

  7. #7
    Join Date
    Apr 2004
    Location
    NC
    Posts
    5

    Re: More Info

    Originally posted by mjweyland
    yes it is possible.... Lets expand on that......


    What you are trying to do is parameter query that drives a report. You can prompt the user to enter in some criteria that will be used to exclude/include information on a report.

    For the query for the respective report on the criteria line you can add
    between [Enter Start Date] AND [Enter End Date] and it will prompt the user for the dates
    I was thinking of creating textbox for uer to enter start date and end date and then have calander beside the txtbox for the user to select date range.

  8. #8
    Join Date
    Apr 2004
    Location
    NC
    Posts
    5

    Re: More Info

    Originally posted by Desiguju2004
    I was thinking of creating textbox for uer to enter start date and end date and then have calander beside the txtbox for the user to select date range.
    I have use following codes to accomplist this but how would i do this when i have more then one reports that will be using these txt box ?

    Private Sub cmdOK_Click()
    On Error GoTo ErrorHandler

    Dim strReport As String
    Dim strField As String
    Dim strWhere As String
    Const conDateFormat = "\#mm\/dd\/yyyy\#"


    strReport = "rptOrder"
    strField = "OrderID"

    If IsNull(Me.txtStartDate) Then
    If Not IsNull(Me.txtEndDate) Then 'End date, but no start date.
    strWhere = strField & "<" & Format(Me.txtEndDate, conDateFormat)
    End If
    Else
    If IsNull(Me.txtEndDate) Then
    strWhere = strField & " > " & Format(Me.txtStartDate, conDateFormat)
    Else
    strWhere = strField & " Between " & Format(Me.txtStartDate, conDateFormat) _
    & " And " & Format(Me.txtEndDate, conDateFormat)
    End If
    End If

    DoCmd.OpenReport strReport, acViewPreview, , strWhere

    ErrorHandler:
    If Err.Number > 0 Then
    DoCmd.OpenForm "frmWhatDates"
    End If


    End Sub

Posting Permissions

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