Hi
I have a form (frmMain) which has
-a subForm (called ResultsBox -has a list of ‘Name’ and ‘Address’ and other fields)
-a button – when clicked reads the list in ResultsBox and outputs to a file on my C Drive. I want to dump the contents of ResultsBox to a text file
So I need to do the steps
-open a file on the C Drive (with “Open FileName For Output As MyFile” ??)
-open a RecordSet of ResultsBox – ( with Set ResSet = Me![ReAssignDocs].OpenRecordset - but can’t get this to work)
-Go to first record in ResultBox (or ResSet)
-Loop through the list in ResultsBox
-For each record output to the file on the C Drive
The problem I have is I can’t get the syntax right for opening and manipulating the ResultsBox (ie OpenRecordSet etc). I get a type mismatch when I do
Set ResSet = Me![ResultsBox].OpenRecordset
And I don’t know how to dump data into a text file
Any help appreciated, Thanks
I have a form (frmMain) which has
-a subForm (called ResultsBox -has a list of ‘Name’ and ‘Address’ and other fields)
-a button – when clicked reads the list in ResultsBox and outputs to a file on my C Drive. I want to dump the contents of ResultsBox to a text file
So I need to do the steps
-open a file on the C Drive (with “Open FileName For Output As MyFile” ??)
-open a RecordSet of ResultsBox – ( with Set ResSet = Me![ReAssignDocs].OpenRecordset - but can’t get this to work)
-Go to first record in ResultBox (or ResSet)
-Loop through the list in ResultsBox
-For each record output to the file on the C Drive
The problem I have is I can’t get the syntax right for opening and manipulating the ResultsBox (ie OpenRecordSet etc). I get a type mismatch when I do
Set ResSet = Me![ResultsBox].OpenRecordset
And I don’t know how to dump data into a text file
Any help appreciated, Thanks