Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I just started using Access VBA 2003 and I came across 2 very odd things: Why is the syntax different from Excel? In my Excel macros I use the Microsoft ActiveX Data Objects 2.8 Library. Here is a code sample in Excel: Dim cnn As New Connection Dim rst As New Recordset Dim strSQL As String cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb" Set rst = Nothing strSQL = "SELECT * FROM Table1" rst.Open strSQL, cnn When I tried this in Access it didn't like the "New" qualifier and Open was not a function of the recordset class. Why is this? It's the exact same reference. Also after I was trying to get the code in Access to work I noticed that all of my Excel references were changed from Microsoft ActiveX Data Objects 2.8 Library to Microsoft ActiveX Data Objects 2.1 Library. Does anyone know what is going on? Help!!!! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
syntax error in VBA in query from Access | Excel Discussion (Misc queries) | |||
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? | Excel Discussion (Misc queries) | |||
Excel VB - WHERE syntax error in Access web query. | Excel Programming | |||
SQL syntax in VBA for Access | Excel Programming | |||
Microsoft][ODBC SQL Server Driver]Syntax error or access violation | Excel Discussion (Misc queries) |