Function test()
On Error GoTo test_Err
DoCmd.TransferText acImportFixed, "PV01", "PV01", "C:\Text\Copy of ADV0315701.txt", False, ""
DoCmd.RunSQL "DELETE * FROM PV01 WHERE field1 not like ""*#*""; ", -1
test_Exit:
Exit Function
test_Err:
MsgBox Error$
Resume test_Exit
End Function
This is converted from a macro to a module…
I would like some help in order to have that in a form.
What the above does is the following:
Insert a txt file "C:\Text\Copy of ADV0315701.txt"
into a table “PV01”
using the specification “PV01”
and deletes the rows of the txt file that have the # sign.
I need to create a form so that the user can:
1) Browse in his computer and select the file – text box maybe
2) Specify the name of the table that is going to be created – text box maybe
3) Specify the specification to be used – text box maybe
4) Delete * from PV01 where field1 …. PV01 needs to take the value from 2 (from the name of the table that is going to be created) – text box maybe
I would appreciate if you could give to this email your urgent attention.
Thank you
On Error GoTo test_Err
DoCmd.TransferText acImportFixed, "PV01", "PV01", "C:\Text\Copy of ADV0315701.txt", False, ""
DoCmd.RunSQL "DELETE * FROM PV01 WHERE field1 not like ""*#*""; ", -1
test_Exit:
Exit Function
test_Err:
MsgBox Error$
Resume test_Exit
End Function
This is converted from a macro to a module…
I would like some help in order to have that in a form.
What the above does is the following:
Insert a txt file "C:\Text\Copy of ADV0315701.txt"
into a table “PV01”
using the specification “PV01”
and deletes the rows of the txt file that have the # sign.
I need to create a form so that the user can:
1) Browse in his computer and select the file – text box maybe
2) Specify the name of the table that is going to be created – text box maybe
3) Specify the specification to be used – text box maybe
4) Delete * from PV01 where field1 …. PV01 needs to take the value from 2 (from the name of the table that is going to be created) – text box maybe
I would appreciate if you could give to this email your urgent attention.
Thank you