Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Recordsets

Status
Not open for further replies.

magicscreen

Programmer
May 4, 2001
10
US
How do I pass a DAO recordset as a parameter to a function in Access 2000?

Thanks
 
Here is an example which does nothing at all but receive a recordset.

Public Sub sgetrs(rv As Recordset)
On Error GoTo sgetrs_Error



On Error GoTo 0
Exit Sub

sgetrs_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure sgetrs of Module gmod1"
End Sub


'---------------------------------------------------------------------------------------
' Procedure : sbrecset
' DateTime : 9/28/2002 09:21
' Author : bermanr
' Purpose :
'---------------------------------------------------------------------------------------
'
Public Sub sbrecset()
On Error GoTo sbrecset_Error
Dim rs As Recordset

Set rs = CurrentDb.OpenRecordset("SELECT * FROM tblstate", dbOpenDynaset)
Call sgetrs(rs)


On Error GoTo 0
Exit Sub

sbrecset_Error:

MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure sbrecset of Module gmod1"
End Sub
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top