I have an interesting situation. When my users create new records everything is working ok, I need to do something a little different.
When a record is added it gets a number. Lets say 80102 is the next record number. So now lets say I want to save a document to this record that will be stored in a file folder. It is currently saving documents to this folder because I have an add event that is this.
Dim fso, f, ndir
ndir="D:\Apps\Database Documents\" & Session(strTableName & "_masterkey1")
So documents for 80102 are saved in a folder named 80102. Well I need to change this process?
Because I have had a bunch of Files I had to change my directory structure. I created sub folder that look like this.
Folder 0000-9999 Any record thats 0 - 9999 Documents are stored here.
Folder 10000-19999 Any record thats 10000 - 19999 Documents are stored here.
Folder 20000-29999 Any record thats 20000 - 29999 Documents are stored here.
Folder 30000-39999 Any record thats 30000 - 39999 Documents are stored here.
I hope I've explained this well enough.
Now the Access database I achieve this with this code
LPID = Len(Forms![patient information]![PatientID])
LLPID = LPID - 4
FPath = "L:\database documents\" & Left(Forms![patient information]![PatientID], LLPID) & "0000-" & Left(Forms![patient information]![PatientID], LLPID) & "9999\" & Forms![patient information]![PatientID] & "\"
MkDir (FPath)
How can I do the same in ASPRunner?