Here are some examples. As for using just database or just recordset, I really don't know. I would guess it all has to do with functionality. What do you want to do with the recordset, database, object, etc.
Code:
'This will open a recordset for all of the fields in tblMain
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("tblMain", dbOpenDynaset)
'Make sure some records exist. You want to
'do something like this especialy if
'using a query or applyng a filter or
'using .Findfirst, etc
If rs.EOF = True Then
MsgBox "No Records found"
Set rs = Nothing
Exit Sub
End If
'Since there are records we can move around
rs.MoveFirst
'Let's edit this record
rs.Edit
rs![FieldOne] = "Something"
rs![FieldTwo] = 200
'while we are here, let's collect some info
strSomething = rs![FieldThree]
'Don't forget to save the changes we made
rs.Update
'We are done so let's tidy up
rs.Close
Set rs = Nothing
'Here is an example of looping through al the records in a form's recordset
Set rs = Me.RecordsetClone
If rs.EOF = False Then
rs.MoveFirst 'We are at the first record so do not move next yet
Do Until rs.EOF
rs.Edit
rs![FieldOne] = 200
rs.Update
rs.MoveNext
Loop
Else
MsgBox "No records Found!"
Set rs = Nothing
End If
'Here is another way to loop through
Set rs = Me.RecordsetClone
If rs.EOF = False Then 'Make sure there are records here
rs.MoveFirst 'We are at the first record so do not move next yet
While rs.EOF = False
rs.Edit
rs![FieldOne] = 200
rs.Update
rs.MoveNext
Wend
Else
MsgBox "No records Found!"
Set rs = Nothing
End If