Dim rstAuthors As ADODB.Recordset
Dim strCnn As String
Dim strMessage As String
Dim intCommand As Integer
' Open recordset from Authors table.
strCnn = currentproject.connection
Set rstAuthors = New ADODB.Recordset
rstAuthors.CursorType = adOpenStatic
' Use client cursor to enable AbsolutePosition property.
rstAuthors.CursorLocation = adUseClient
rstAuthors.Open "Authors", strCnn, , , adCmdTable
"Authors" is a table name, but you can use a query.
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
Dim rs As New ADODB.Recordset
'open the greenridge export query
rs.Open "Authors", cn, adOpenForwardOnly, adLockOptimistic
Sal
|