Hi Allen,
Thanks for the answer!
Here's some code, in case someone else looks for the same thing at a
later date:
Sub SaveAccessObjectsToFile()
Dim obj As AccessObject
Dim dbs As Object
Dim dbd As Object
Dim filesaveloc as string
Set dbs = Application.CurrentProject
Set dbd = Application.CurrentData
filesaveloc = "C:\Documents And Settings\" ' Edit to your preferred
save location
For Each obj In dbs.AllForms
SaveAsText acForm, obj.Name, filesaveloc & obj.Name & ".cls"
Next
For Each obj In dbs.AllModules
SaveAsText acModule, obj.Name, filesaveloc & obj.Name & ".bas"
Next
For Each obj In dbd.AllQueries
SaveAsText acQuery, obj.Name, filesaveloc & obj.Name & ".sql"
Next
End Sub
Note: I haven't been able to save table objects using "SaveAsText
acTable", but this may be because the tables are linked rather than
local to the mdb file executing this code.
Thanks again!
Much warmth,
planetthoughtful
---
"lost in thought"
http://www.planetthoughtful.org