Recordset object

R

Ron Weiner

Nexus

Have you looked in Access Help? There are a few examples there. Here is
another one, but until you tell us exactly what it is that you are tying to
do we can only give general advise.

Dim rs As ADODB.Recordset, strSomeValue as String

Set rs = New ADODB.Recordset
rs.Open "SomeTableName or Sql statement", _
CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With rs
If not .EOF Then
strSomeValue = Nz(!SomeFieldName,"")
Debug.Print "SomeFieldName in SomeTable = " & strSomeValue
End If
.Close
End With
Set rs = Nothing

The above example gets the value of a field in the opened recordset and
prints it in the immediate window. Hope this helps.

Ron W
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top