You have to open up the database and then open up your recordset in your code....
'Declare Your Variables...
Dim MyDB as database
Dim MyRecs as Recordset
'Set Your Variables....
Set MyDB = currentdb
set MyRecs = MyDB.openrecordset("RecordSetName")
'Now all you have to do to refer to a field is use...
MyRecs![FieldName]
At the end of your functions, make sure you clean up your objects to clear up memory...
MyDB.close
Set MyRecs = Nothing
Set MyDB = Nothing
Hope this helps you...
Doug