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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create text file. File name from database.

Status
Not open for further replies.

ummul21

Programmer
Jun 23, 2003
21
SG
Hi,
I have 2 column in my table
1.Serial_no
2.Serial_line.

Every time there is an additional record into the table, I want to create a text file using the serial_no & serial_line as the file name.

Lets say the serial_no=2 and serial_line=3, So I want my table name to be 2_3.txt

Please help me.... Thanks in advance...

Ummul.
::)

 
Dim iFilenNum As Integer
Dim serial_no As String
Dim serial_line As String
iFilenNum = FreeFile
serial_no = "2"
serial_line = "3"
Open App.path & "\" & serial_no & "_" & serial_line & ".txt" For Output As #iFilenNum
Print #iFilenNum, "MyData"
Close #iFilenNum
 
Thanks CCLINT.....
It is working....

Ummul ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top