none
MS Access VBA Me.RecordSource report will not save RRS feed

  • Question

  • Hi,

    I have a report in Access 2016 and a button in the report that will change the record source.  i have that working, but what I want it to do next is save the new record source in that report?

    --------------------------------------------------    

    Private Sub btnComplete_Click()

        Me.RecordSource = "qry_01i_Status_Complete_Filter"

        Me.btnPending.Visible = True
        Me.btnPending.SetFocus
        Me.btnAll.Visible = False
        Me.btnComplete.Visible = False

        DoCmd.Save acReport, "rpt_TEMPLATE_STATUS"

    End Sub

    --------------------------------------------------    

    when i close and re open the report is does not keep the change?  Hope someone can help?

    Thursday, February 15, 2018 10:13 PM