Updating date field

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ksuwyldkat

Thread Starter
Joined
Nov 9, 2000
Messages
341
Not sure how to go about this. I am not a programmer by any means but need to make a program.

I have a text file that is in what is called BAI format (bank standard format to send info). Basically this is a CSV file with a header. Right now I use a mail merge file to update the date field. I am looking to automate this so I would only need one "dummy" file and have a program that will update the date field automatically. The file is opened with notepad. I have done some VB but not a lot. I am looking for the best way to go about doing this. I tried to get some of the programmers to do it but no one wants to worry about supporting it, so I am taking a crack at it.

All help is very much appreciated. One idea I had is maybe a macro in excel but not sure if it would mess up the formating. I will try to get a copy of the file I use and post it.
 
Joined
Jul 29, 2001
Messages
21,334
Import the file directly into Access. You can either import it first and change any data fields to match what you want them to be, or create the table ahead of time with the desired fields in it. I believe you could set up a macro to update a date field with the current date or set the default for the date field to read =Date()...when you import a new file the current date will automatically be entered.
 

ksuwyldkat

Thread Starter
Joined
Nov 9, 2000
Messages
341
Thanks,

I will try this when I get back to the office. I will let you know how it works out.
 

ksuwyldkat

Thread Starter
Joined
Nov 9, 2000
Messages
341
I have tried doing it through Access with not much luck.

The problem is in the way BAI is set up, it has a header record, detail and continuation records etc. The way each different type of information is by the beginning of the line.
01, signifies a header record, 16, signifies detail etc. Also at the very begining of the file is a %% that I think is for the file loader to know when to begin to load the file.

Example:

%%START ADMIN ADMIN BRBAI2 000080 DEMO
01,012345672,012345672,020405 ,0918,01,80,,2/
02,012345672,012345672,1,020305 ,0918,USD,4/
03,000001234567,/
16,156,606762,0,DD1620,/
88,MISC PAY TREASURY /
49,606762,1/
98,606762,1,1/
99,606762,1,8/
%%END BRBAI2 138


The only thing I need to change is the ones that are highlighted, which is the date of the file and the date that it is reporting. Access is reading this all as one record.
 

ksuwyldkat

Thread Starter
Joined
Nov 9, 2000
Messages
341
I was wondering, since I use a mail merge now, if there might be a way to write something to fill in that field automatically. Right now I go and make another document called Date Input and it feeds the dates into it. Would there be a way to keep the same demo file and have something fill in the merge field.



EX.
%%START ADMIN ADMIN BRBAI2 000080 DEMO
01,012345672,012345672,<b>«FileDate_YYMMDD»</b>,0918,01,80,,2/
02,012345672,012345672,1,«FileDate_YYMMDD»,0918,USD,4/
03,000001234567,/
16,156,606762,0,07777777794156,/
88,MISC PAY TREASURY /
16,581,580913,,/
88,000004444444412/
16,462,3494676,,071088889894224,/
88,USATAXPYMT EFTPS - CHICAGO /
16,462,3400,,11111111112,/
88,CHECK/ACC. DELUXE CHECK /
16,156,4889,0,1000001557853,/
88,BC DEPOSIT BANK /
49,4690640,12/
03,000007654321,/
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top