Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form creation

Status
Not open for further replies.

dinats

Programmer
Joined
Jun 25, 2003
Messages
2
Location
PT
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


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top