Hi Alex,
I do get the reference to the application since I can obtain object names,
DateCreated, etc... But can not use the Application.SaveAsText, it is now
returning an error "You canceled the previous operation."
Code in question is:
------------code start-------------
Public Function dbObjeDets()
Dim db As DAO.Database
Dim strPath As String
Dim cnt As Container
Dim doc As Document
strPath = Forms!fr_ShowDBdetails!filename
Set db = OpenDatabase(strPath, True, True) 'ws.OpenDatabase(strPath, True,
True)
Set cnt = db.Containers("Forms")
On Error GoTo dbObjeDets_Err
For Each doc In cnt.Documents
Application.SaveAsText acForm, doc.Name, lokasyon & doc.Name &
".txt"
'Debug.Print doc.Name & ", Create:" & doc.DateCreated & ", Update:"
& doc.LastUpdated
Next doc
dbObjeDets_Err:
MsgBox Err.Description
Set db = Nothing
Set rs = Nothing
Set cnt = Nothing
End Function
----------------------code end---------------
"lokasyon" is a function that returns the full path of the database opened
less the file name. The commented Debug.Print is working if uncommented (and
the Application.SaveAsText.... commented of course)
The part from "Set cnt = ...." onwards works without a hitch when run within
the database which I am trying to get results out of.
What am I doing wrong?
Thanks in advance,
Alp