R
rebelscum0000
Dear All
I want to read record by record in a tbl in order to save the records
in a .txt file
Not manually, there is not a fixed string
I have this code it was working I do not know what I am doing wrong
Thanks in advance for any help
Regards,
Antonio Macias
This is my code;
'Initialize New Event Primary_Main_Event
'Initialize Variables
DHFFF = FreeFile()
'Select Only the Records of the Field Name DirHashFiles
'From the Tbl TempData_Tbl
sQL1 = _
"SELECT TempData_Tbl.DirHashFiles " & _
"From TempData_Tbl; "
'sQL16 = _
'"SELECT TempData_Tbl.ID, TempData_Tbl.DirHashFiles " & _
'"From TempData_Tbl " & _
'"ORDER BY TempData_Tbl.ID;"
'Initialize Variables
'Determine the number of records that are in the Tbl TempData_Tbl
intk = DCount("*", "TempData_Tbl")
Debug.Print "number of records that are in the Tbl TempData_Tbl "
& intk
Debug.Print "strVerify " & strVerify
Open strVerify For Output As #DHFFF
Set amcdb = CurrentDb
Set amcrs = amcdb.OpenRecordset(sQL1, dbOpenDynaset)
For intl = 1 To intk
'DHFID = amcrs.Fields("ID")
DHF = amcrs.Fields("DirHashFiles")
Print #DHFFF, DHF
amcrs.MoveNext
Next intl
Close #DHFFF
amcrs.Close
amcdb.Close
Set amcdb = Nothing
I want to read record by record in a tbl in order to save the records
in a .txt file
Not manually, there is not a fixed string
I have this code it was working I do not know what I am doing wrong
Thanks in advance for any help
Regards,
Antonio Macias
This is my code;
'Initialize New Event Primary_Main_Event
'Initialize Variables
DHFFF = FreeFile()
'Select Only the Records of the Field Name DirHashFiles
'From the Tbl TempData_Tbl
sQL1 = _
"SELECT TempData_Tbl.DirHashFiles " & _
"From TempData_Tbl; "
'sQL16 = _
'"SELECT TempData_Tbl.ID, TempData_Tbl.DirHashFiles " & _
'"From TempData_Tbl " & _
'"ORDER BY TempData_Tbl.ID;"
'Initialize Variables
'Determine the number of records that are in the Tbl TempData_Tbl
intk = DCount("*", "TempData_Tbl")
Debug.Print "number of records that are in the Tbl TempData_Tbl "
& intk
Debug.Print "strVerify " & strVerify
Open strVerify For Output As #DHFFF
Set amcdb = CurrentDb
Set amcrs = amcdb.OpenRecordset(sQL1, dbOpenDynaset)
For intl = 1 To intk
'DHFID = amcrs.Fields("ID")
DHF = amcrs.Fields("DirHashFiles")
Print #DHFFF, DHF
amcrs.MoveNext
Next intl
Close #DHFFF
amcrs.Close
amcdb.Close
Set amcdb = Nothing