Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008

    Unanswered: Return Parameter values from Form


    I have written a db thta runs multiple reports all of which must be date ranged and I am now trying to make the run process smoother I have set up a form with a lower and upper date field and a series of option buttons to select which reports to run. I have written the code below off a button to run the report which I can then repeat this works fine.

    Private Sub Command46_Click()

    Dim stdocname As String
    stdocname = "Delivery Prior Quotation"
    If Me.Delivery_Prior_Quotation.Value = -1 Then
    DoCmd.OpenReport stdocname, acViewNormal

    End If

    End Sub

    My question is can I make the dates from the form return to the parameter values the report requests??

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 12
    Change your query to point at that form.
    SELECT some_field
    FROM   some_table
    WHERE  some_field = Forms!...
    Home | Blog

  3. #3
    Join Date
    Nov 2007
    Adelaide, South Australia
    can I make the dates from the form return to the parameter values the report requests?
    Replace your parameters with references to form controls:

    Between Forms!ReportingDialogName!StartDateControlName And Forms!ReportingDialogName!EndingDateControlName
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!

    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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