When the user selects a record in the subform and then clicks on the button on the main form, it opens up to another form(filtered form) that contains the history of the selected record).
To obtain a filtered recordset, I created and executed a recordset through a stored procedure in the click event procedure. I am not sure how I can populate the form with the recordset from the stored procedure. I did a debug.print on the recordset and right results displayed.
**I want the results from the stored procedure as the recordsource for the form I want to open to.***
This is what I have:
Private Sub w_o__history_Click()
On Error GoTo Err_w_o_history_Click
Dim ret_val As Integer
Dim check_wo_history As New ADODB.Command
Dim rs_check_wo_history As New Recordset
Dim work_ord_num As String, work_ord_line_num As String
Dim lngRecs As Long
Dim stDocName As String, stLinkCriteria As String, strWhere As String