raghuprabhu
Registered User.
- Local time
- Today, 14:57
- Joined
- Mar 24, 2008
- Messages
- 154
I have a table called tblCountryName. It has two columns, an ID column and a country name column which has names of 45 countries. I want to create txt files in the same directory of the database in the following format “countryName-ddMMMyyyy.txt” for example “Australia – 22Aug2011.txt“ . The txt file should be created for every country in the table. How do I do it?
Thanks
Raghu
Code:
Private Sub cmdCPC_Click()
On Error GoTo Err_cmdCPC_Click
Dim FileNum As Integer
FileNum = FreeFile
…..
…..
…..
missing code....
…..
…..
Open CurrentProject.Path & "countryName-ddMMMyyyy.txt" For Output As #1
Print #1, "xx"
Print #1, "--"
Close #1
Exit_cmdCPC_Click:
Exit Sub
Err_cmdCPC_Click:
MsgBox Err.Description
Resume Exit_cmdCPC_Click
End Sub
Thanks
Raghu