I am using MS Access 2000 and am not experienced with VBA. Any help or pointers would be greatly appreciated.
I am trying to run a report that uses the records of an update query.
It's set up like this...From a form there is a command button that I use an onclick event to call the update query. By itself the update query works great. The query will prompt for a "Pay Date" and a "Bill Date". What the query does is search for every record with pay_date = "Pay Date" and updates the bill_date field with "Bill Date". From that point I need to run a report based on the results of the update query. Below is some VBA code that I am trying to get to work. I know it's messed up at the set rsPayDate line. I don't know how to get the same recordset from the update query and set it as the recordsource of the report.

Private Sub cmdPayDate_Click()
On Error GoTo Err_PayDate_Click
Dim stDocName As String
Dim rsPayDate As Recordset
DoCmd.OpenQuery ("qryUpdateBillDate"), , acEdit
Set rsPayDate = OpenRecordset("qryUpdateBillDate")
rptVerifyUpdate.RecordSource = rsPayDate
stDocName = "rptVerifyUpdate"
DoCmd.OpenReport stDocName, acPreview
Exit_cmdPayDate_Click:
Exit Sub

Err_cmdPayDate_Click:
MsgBox Err.Description
Resume Exit_cmdPayDate_Click

End Sub

Please help.