![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Here's a weird request I just got. I need to program Access to create text files in a specific folder and put on extensions that are like . 000, the next one is .001, etc. How in the world would I even start something like that? Thanks, Laura |
#3
| |||
| |||
|
|
musicloverlch wrote: Here's a weird request I just got. *I need to program Access to create text files in a specific folder and put on extensions that are like . 000, the next one is .001, etc. How in the world would I even start something like that? Thanks, Laura I suppose you could read every file's extension and take the largest. You'd be better off having a table that holds the current extension value. *Take that value, inc it by 1, write back that value to the table and use format(value,"000") to zero pad the result. *What happens after999? To create the files...look at TransferText in help. *Or to roll your own look at Open,Close, Input, Write, Print, Put and their examples in help. * Also Dir to find files. |
#4
| |||
| |||
|
|
Or I forgot to mention that it resets every day. Files are picked up daily from another company. On Apr 24, 10:08 am, Salad <o... (AT) vinegar (DOT) com> wrote: musicloverlch wrote: Here's a weird request I just got. I need to program Access to create text files in a specific folder and put on extensions that are like . 000, the next one is .001, etc. How in the world would I even start something like that? Thanks, Laura I suppose you could read every file's extension and take the largest. You'd be better off having a table that holds the current extension value. Take that value, inc it by 1, write back that value to the table and use format(value,"000") to zero pad the result. What happens after 999? To create the files...look at TransferText in help. Or to roll your own look at Open,Close, Input, Write, Print, Put and their examples in help. Also Dir to find files. OK. then add a date field. If no record for that day, add a new record |
#5
| |||
| |||
|
|
musicloverlch wrote: Or I forgot to mention that it resets every day. Files are picked up daily from another company. On Apr 24, 10:08 am, Salad <o... (AT) vinegar (DOT) com> wrote: musicloverlch wrote: Here's a weird request I just got. *I need to program Access to create text files in a specific folder and put on extensions that are like . 000, the next one is .001, etc. How in the world would I even start something like that? Thanks, Laura I suppose you could read every file's extension and take the largest. You'd be better off having a table that holds the current extension value. *Take that value, inc it by 1, write back that value to the table and use format(value,"000") to zero pad the result. *What happens after 999? To create the files...look at TransferText in help. *Or to roll your own look at Open,Close, Input, Write, Print, Put and their examples in help.. *Also Dir to find files. OK. *then add a date field. *If no record for that day, add a new record and set the counter field to 0. *Then increment. It you store a table with the documents, you could split the name and extension and get the max extension number for that day as well.- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Here's a weird request I just got. I need to program Access to create text files in a specific folder and put on extensions that are like . 000, the next one is .001, etc. How in the world would I even start something like that? Thanks, Laura |
![]() |
| Thread Tools | |
| Display Modes | |
| |