Generating a new F# and creating an empty folder on new data entry

JStan89

Registered User.
Local time
Today, 11:16
Joined
Jan 23, 2015
Messages
18
Hello all,

I've been asking for a few final questions to get this database up and running. I'm very new to VBA, but imagine this feature will have to be done VBA.

So, under the "Scheduling" form, when a new record is selected, I'd like for the REQ# to auto generate the next F#. The F# goes in order based off newest entry. For instance, the newest entry would be F15-090, since the previous one was F15-089... and so on once a new entry is submitted. The F# will change every year on October 1. So next October, it will start with F16-001. Is this possible?

My next question is, the F# needs to be a hyperlink, with an attached new empty folder (for drawings, etc.) with that same F# as the file folder name. This folder will be placed in a certain location, for now we could say just to store these new folders on desktop. Is this possible?


I appreciate the help in advance! Please see database.
 

Attachments

Hi
The F# can be autogenerated from the last number. you need to break the F#down into a string and integers. I assume that the 16 part of the F16 comes from the year. i do this from January in one of my db's. You will have to allow for your October implementation.
So concatenate 'F' & Year(last two digits) & '-' and then last number + 1 formated as three digits
in VBA you can use MKDIR statement to create a directory e.g. mkdir "C:\test\". This could be generated from a field that is formmated as a hyperlink.
I hope that this helps. My PC with my actual code is elsewhere at the moment but I hope this helps
 

Users who are viewing this thread

Back
Top Bottom