Hi,
here is an example of code how to bind a form to a recordset:
Private Sub Form_Load()
Dim rst As Recordset
Set rst = New ADODB.Recordset
Set rst.ActiveConnection = CurrentProject.Connection
rst.CursorLocation = adUseClient
rst.Open "query_name"
Set Me.Recordset = rst
End Sub
See also the Access help file on the Form.Recordset property.
Another possibility for you could be to use pass-through queries. You would create a pass-through query for calling the stored procedure. You would then open the query and if there were some records, you would change the RecordSource property to the query. Or the RecordSource of the form could be already set to the query in the design view, in which case you would check if it there any records in the load event handler.
The pass-through query could look like this:
{call sp_name(param1, param2,...) }
Main Topics
Browse All Topics





by: cwvsmartPosted on 2003-05-06 at 01:06:10ID: 8468886
could you provide some examples of your problems...coz i can't quite understand????