Air_Cooled_Nut
Registered User.
- Local time
- Yesterday, 20:13
- Joined
- Nov 24, 2004
- Messages
- 17
First, I'm very handy with VBA for Excel but basically a beginner when it comes to VBA for Access.
I have established an ADODB connection and can pull data with VBA in Access 2003 (XP OS). I have the following code:
This works and I can see the fields in my Immediate Window.
Okay, so how do I get this data into an actual Access table? Either creating a new table or -- better yet -- appending the data into an existing table?
My goal is to create a table at the beginning of the month and populate it at the end of every day w/data from the ADODB data source. Once the month is over a new table is created and the process repeats. TIA!
I have established an ADODB connection and can pull data with VBA in Access 2003 (XP OS). I have the following code:
Code:
...
Set objRecordSet = objCommand.Execute 'Pull the record set
'Test
Do Until objRecordSet.EOF 'Go thru each record until we hit the EOF marker
For i = 0 To objRecordSet.Fields.Count - 1 'Loop thru every field in the record
Debug.Print i & "=" & objRecordSet.Fields.Item(i).Name & ", " & objRecordSet.Fields(i).Value
Next
objRecordSet.MoveNext 'Move to the next record
Loop
...
Okay, so how do I get this data into an actual Access table? Either creating a new table or -- better yet -- appending the data into an existing table?
My goal is to create a table at the beginning of the month and populate it at the end of every day w/data from the ADODB data source. Once the month is over a new table is created and the process repeats. TIA!