G
Guest
The following code comes from McFedries 2007 office System
Notes: I have created the Reference to Data Objects 2.8
Access Driver(*.mdb, *.accdb)
Data Source: Northwind Data Base via its location
------------------------------------------------------------------------
Code as follows:
'
'Sub RecordsetOpenSELECT() ' Opening a recordset Object using
'A Select Statement
'
'Dim Recordset,String
'
Dim rs As ADODB.Recordset
Dim strSelect As String
'
'Create a recordset Object
'
Set rs = CreateObject("ADODB.Recordset")
'
'Open It
'
strSelect = "SELECT * From Customers" & "WHERE [State/Province]='CA'" &
"ORDER BY Company;"
rs.Open strSelect, "Northwind", adOpenKeyset ( Message at this line)
(States Object Database doesn't support this statement) any ideas why?
'
'Display the contact Name and Company for the first record
'
MsgBox "The " & rs.Source & " table is now open!"
'
'Close it
'
rs.Close
Set rs = Nothing
'
Thanks for taking the time to review this
Notes: I have created the Reference to Data Objects 2.8
Access Driver(*.mdb, *.accdb)
Data Source: Northwind Data Base via its location
------------------------------------------------------------------------
Code as follows:
'
'Sub RecordsetOpenSELECT() ' Opening a recordset Object using
'A Select Statement
'
'Dim Recordset,String
'
Dim rs As ADODB.Recordset
Dim strSelect As String
'
'Create a recordset Object
'
Set rs = CreateObject("ADODB.Recordset")
'
'Open It
'
strSelect = "SELECT * From Customers" & "WHERE [State/Province]='CA'" &
"ORDER BY Company;"
rs.Open strSelect, "Northwind", adOpenKeyset ( Message at this line)
(States Object Database doesn't support this statement) any ideas why?
'
'Display the contact Name and Company for the first record
'
MsgBox "The " & rs.Source & " table is now open!"
'
'Close it
'
rs.Close
Set rs = Nothing
'
Thanks for taking the time to review this