Good Morning,
I have been tasked with a "proof of concept" assignment. My manager is asking me to take an Access 2016 Table, and export it to a non-delimited, flat file that can be used in mainframe processing. Each output record will be the same length, and there are implied column lengths which must be accommodated for.
The code must be initiated from a command button within a form inside the application. (The user must not do this on their own using a wizard )Does anyone know of any script that can accomplish that? I have been unsuccessful obtaining this information on the internet, and am hoping someone with programming (vba) knowledge to offer some advice.
Example: Export table to 100 byte flat file without delimiters:
Table Name: tstAccessTable
Column1: Employee_ID (integer) '1234' (Must be output to a 10 byte column, padded to left with zeros)
Column2: Last_Name (Short String) '"Smith" (Must be 25 characters on output, left justified, padded with spaces)
Column3: First_Name (Short String) "John" (Must be 15 Characters on output, left justified, padded with spaces)
Column4: City (Short String) "Anycity" (Must be 15 Characters on output, left justified, padded with spaces)
Column5: State (Short String) "NY" (Must be 2 Characters on output)
Column6: Zip_Code_Full (Short String) "12345-6789" (Must be 11 Characters on output, left justified, padded with spaces if there is no zip-4)
Column7: Department Code (integer) '1234567890' (Must be output to a 10 byte column, padded to left with zeros if the code is less than 10-digits)
Output record example: 0000001234Smith___________________John___________B uffalo_________NY14201-13241234567890____________
Remaining fields to the right (pos 89-100 are initializes to spaces).
Thanks for your help in advance!
Mark