VB Code:
Private Sub Command1_Click()
Dim myRecorset As Recordset
Set myRecorset = getRecordset("blstpot")
myRecorset.MoveFirst
Debug.Print myRecorset(1)
myRecorset.Close
End Sub
Public Function getRecordset(Table As String) As Recordset
Dim dbsBlastRoom As Database
Dim rstRecord As Variant
Set dbsBlastRoom = OpenDatabase(App.Path & "\blstroom.mdb")
Set rstRecord = dbsBlastRoom.OpenRecordset(Table)
getRecordset = rstRecord ' *** i get error here " INVALID USE OF PROPERTY
rstRecord.Close
dbsBlastRoom.Close
End Function