New to Access coding. Hoping someone can help with the coding in Access VBA. Just don't know how to start this. Any help is greatly appreciated! Thank you in advance.
Here is pseudocode for what i trying to do:
1. prompt user for date of file to open
2. open file in a specific path (c:\2015_12_05 Cust.txt) if file not found, display message 'no file found'
3. append data records from the opened file (data records are found between the words START-OF-FIELDS and END-OF-FIELDS) to existing access table called 'customer'
4. once file is processed move the c:\2015_12_05 Cust.txt file to a different folder c:\history\2015_12_05 Cust.txt
sample data file
-------------------
START-OF-FILE
RUNDATE=20151205
PGM=oneshot
FIRM=xxxxx
COMPRESS=xxx
FILETYPE=disk
FILENAME=xxx
SOURCE=data
DATERANGE=20161205|20161205
FORMAT=horizontal
# London
# England
START-OF-FIELDS
name
address
state
zip
END-OF-FIELDS
START-OF-DATA
000000001|0|99|12/05/2015|MAC SHAW|654 CLARA ST.|NEW JERSY|90004|
000000001|0|99|12/05/2015|MARY PETERS|1343 LANDINGS|NEW MEXICO|45321|
000000001|0|99|12/05/2015|JACKLYN MCDONALD|4341 SUPERIOR ST.|NORTH CAROLINA|83721|
000000001|0|99|12/05/2015|LAURA CUMMINGS|982 5TH AVENUE|NEW YORK|73821|
000000001|0|99|12/05/2015|SARAH MCPHERSON|4214 HOLLYWOOD|CALIFORNIA|93830|
END-OF-DATA
TIMEFINISHED=TUES DEC 6 13:27:24 2015
END-OF-FILE
Here is pseudocode for what i trying to do:
1. prompt user for date of file to open
2. open file in a specific path (c:\2015_12_05 Cust.txt) if file not found, display message 'no file found'
3. append data records from the opened file (data records are found between the words START-OF-FIELDS and END-OF-FIELDS) to existing access table called 'customer'
4. once file is processed move the c:\2015_12_05 Cust.txt file to a different folder c:\history\2015_12_05 Cust.txt
sample data file
-------------------
START-OF-FILE
RUNDATE=20151205
PGM=oneshot
FIRM=xxxxx
COMPRESS=xxx
FILETYPE=disk
FILENAME=xxx
SOURCE=data
DATERANGE=20161205|20161205
FORMAT=horizontal
# London
# England
START-OF-FIELDS
name
address
state
zip
END-OF-FIELDS
START-OF-DATA
000000001|0|99|12/05/2015|MAC SHAW|654 CLARA ST.|NEW JERSY|90004|
000000001|0|99|12/05/2015|MARY PETERS|1343 LANDINGS|NEW MEXICO|45321|
000000001|0|99|12/05/2015|JACKLYN MCDONALD|4341 SUPERIOR ST.|NORTH CAROLINA|83721|
000000001|0|99|12/05/2015|LAURA CUMMINGS|982 5TH AVENUE|NEW YORK|73821|
000000001|0|99|12/05/2015|SARAH MCPHERSON|4214 HOLLYWOOD|CALIFORNIA|93830|
END-OF-DATA
TIMEFINISHED=TUES DEC 6 13:27:24 2015
END-OF-FILE