Get folder name

Dzib

New member
Local time
Today, 07:38
Joined
Oct 15, 2019
Messages
6
Hi,


New to this forum and to access, I try to build a small form where I need, when the user create a new record, to go to a specific folder, find the last subfolder (something like F19_1245 where 19 is the current year and 1245 is the record number) and then, create a new subfolder increased by 1 (in this case, F19_1246).
Do you think it's possible? I know how to make a folder but can't find out how to get the last subfolder name...


Thanks ;)
 
Hi. Welcome to AWF! You can use the Dir() function to loop through the folders. Where does the record number come from? Did you say you want to create a subfolder under the last folder you found?
 
Thanks, that's the problem, the record number can only be found in these subfolders names.

I have a folder named 2019 and within that folder, I have 1245 subfolders (F19_0001 to F19_1245 and I want to create a new subfolder each time the user create a new record (F19_1246 then F19_1247,....)
 
Thanks, that's the problem, the record number can only be found in these subfolders names.

I have a folder named 2019 and within that folder, I have 1245 subfolders (F19_0001 to F19_1245 and I want to create a new subfolder each time the user create a new record (F19_1246 then F19_1247,....)

Okay. There may be a better way but one approach I could suggest is grab a sample code to store the folder names in a table. Using queries or code, you will be able to determine the next folder name to use for the new folder.
 

Users who are viewing this thread

Back
Top Bottom