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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save a recordset to a file?

Status
Not open for further replies.

gusbrunston

Programmer
Feb 27, 2001
1,234
US
[tt]
Hi:

Is it possible to save a recordset to a file (not a database) outside the database?

I've tried this code on a command button, however...

Private Sub Command0_Click()
Dim rsChecks As Database
Set rsChecks = CurrentDb()
rsChecks.Save "c:\Datamaster\Database\Checks.dat"
rsChecks.Close
End Sub

I get an error "Compile error: Method or data member not found"

Thanks,
[glasses][tt] Gus Brunston - Access2000(DAO)[/tt] Intermediate skills.
 
Gus

I had your problem with twiddly bits so I wrote the code.

what type of file do you want it to go to?
mine does word,excel, rtf with incremental naming conventions ( for those managers that can't read what date a report was generated - they just has to pick the name with the biggest number at the end)

If you provide email I will send you the full code ( twiddly bits included) - that goes for any of you guys out there.

Documentation in it is succinct but clear (I HOPE)
regards

jo



 
[tt]
Dear JoanneM:

Thank you very much. padregus@attbi.com [glasses][tt] Gus Brunston - Access2000(DAO)[/tt] Intermediate skills.
 
Hi Gus

I use Visual Basic and ADO to copy a MS Access Recordset to a file outwith the database.

Feel free to e-mail me if you want a sample of the code. My e-mail address is elisefreedman57@aol.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top