I am writing a script in VBA which will gather data from multiple Access tables and store them in a single recordset to be transferred to Outlook or Excel. I am using ADO objects.
How do I append more data to a recordset?
Thank you,
Jon
Dim cConn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim sSql As String
sSql = "SELECT Table1.Field1,Table1.Field2, Table1.Field3 FROM Table1 WHERE Table1.Field4 = Yes"
Set cConn = New ADODB.Connection
Set rs = New ADODB.Recordset
cConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data...
UPDATE Table1 SET Table1.FieldX = TRUE WHERE (Left(Table2.FieldY,3) = '000') AND (Right(Table2.FieldZ,7) = Right(Table1.FieldZ,7))
Will this work? Do I need to use a JOIN statement to test the fields from each record in Table2?
Thanks!
I need to compare two identical (in terms of design) tables, and then take an action depending on the comparison. To be more specific, I need to take FieldX from Table1, and look in Table2 to see if there is a record with a matching value of FieldX.
If there isn't a match, the entire record...
I need to open an ODBC connection to a database. I have the connection string (I used the record macro feature to find it), but I don't know what object or syntax to use. I have an update query written in SQL that I need to execute on the databse from the macro. Can anyone give me a code example...
I need to update multiple Access tables within the same database from an Excel Macro. I am not sure which ADO object to use, or the correct syntax. I am familiar with SQL, and already have the Update Query written. Can anyone help? Do I need to provide more/different information? Thanks!
Jonsan
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.