Generating text file for bank transfer

petko

Registered User.
Local time
Today, 15:52
Joined
Jun 9, 2007
Messages
89
Hello all,

I need a help in this: I have to generate text files from Access that define the details of bank transfer records. I'd like to do this automatically as all necessary data are present in my database (like partner data, invoice data etc).

This text file needs to be done according to a certain grammar - like how to set the account number, sender data, amount, etc - that is provided by the bank.

Could you help me out how I could make this? I don't have any experience on this field so any basic and other advice is highly appreciated. Would help a lot a simple example of generating a file with a short word.

thanks in advance

Peter
 
design a query that has the columns you need

then format the columns to get the presentation you need

then export the file to a csv

once this is all ok, you can automate this.

you can also design a layout spec to help standardise the output
 
I use the following code to generate Log Files.

Function fCreateLogFile()
Const LogFileName As String = "Location of Text Files."
Dim FileNum As Integer
FileNum = FreeFile ' next file number
Open LogFileName For Append As #FileNum ' creates the file if it doesn't exist
Print #FileNum, "Employee: " & Environ("username") & " logged on at : " & Now() ' write information at the end of the text file
Close #FileNum ' close the file
End Function
 
Thanks a lot for your help, it works fine.
From the help I can't understand what the filenumber in the Open statment is for, it just don't specify it too much.
Is that someting important to know?

thanks

peter
 
freefile finds a file channel not in use

you need to open a channel to read/write a disk file

you may already have some files in use - so you either explicitly determine you want to use say file2 no 21 to do this, or you ask access to find you the next unused reference (the safest!)
 

Users who are viewing this thread

Back
Top Bottom