Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Access infomation into an Excel file.

Status
Not open for further replies.

andrest

Programmer
Jul 25, 2002
20
CA
Hi! I want to create Excel files every time an Access Database is populated so I can later on repopulate the database with any of the saved Excel files.

I'm a junior programmer and I'm on my own with this problem. Any suggestions?

Thanks in advance. :)

Andre
 
you can better make up a backup of the database ;-) Eric De Decker
vbg.be@vbgroup.nl

 
Thanks for the prompt response Eric.

I had not considered that option. Wouldn't it take alot of space to create thousands of databases.

Andre
 
I understand

a example to copy tables to a Excel file

Set Rst = New ADODB.Recordset
Rst.Open "rpKortOverzicht", cnAdo, adOpenKeyset, adLockOptimistic

Set xlApp = New Excel.Application
xlApp.Workbooks.Open (App.Path & "\RapportBlank.xlt")

If Val(Mid(xlApp.Version, 1, InStr(1, xlApp.Version, ".") - 1)) > 8 Then
With xlApp.Sheets(1)
.Range("A2").CopyFromRecordset Rst
Rst.Close
Set Rst = Nothing
End With
End If Eric De Decker
vbg.be@vbgroup.nl

 
Thanks Eric, I'll give it a try and let you know.

Thanks.

Andre [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top