Wow, sorry everyone, I was not checking in here over the weekend and I'm amazed at the level of activity. Thank you, I appreciate your time and effort.
Also sorry I obviously didn't explain my problem well. I'll give it another try.
My database is a singe table, a list of people with information such as contact details, job role. Also I use it to manage their onboarding to the role and this involves keeping track of whether a number of activities have completed, each evidenced by the presence of a specific type of document. So for each of these I have a field to show whether done/not done.
Alongside the Access database I have I folder structure: a folder for each person and under that folder a repeating structure to organise the evidence documents. So there's a folder for Joe Bloggs, and under that folder are subfolders for Joe's specimen signature form, scope of practice declaration etc.
There are no forms, so far I haven't seen a need for any.
So now when I get an evidence document I file it away in the appropriate folder and then mark "done" in the corresponding field in the table row for that person. I'm changing this so that the database can go and look for itself to see if the evidence documents are present. I'm creating a query with calculated fields, one for each of the evidence documents. Also I have added into my table a new field "FilePath" to hold the name of the evidence documents folder for the person (I could derive this from their name and other information but I'm leaving that for a later enhancement).
I have a function like this:
Function GetFile(Pathname As String) As String
GetFile = Dir(Pathname, vbNormal)
End Function
Calculated field for Specimen Signature is like this:
Specimen Signature: GetFile([FilePath] & "\Specimen Signature\")
Calculated field for Scope of Practice Declaration is like this:
Scope of Practice Declaration: GetFile([FilePath] & "\Scope of Practice Declaration\")
... and similar for each of the other evidence documents.
This looks very inelegant and so I'd like to have the same code in each of these several fields, and have the lowest level part of the folder name (the "Specimen Signature" or "Scope of Practice Declaration" text string) picked up from the field name, either in the field calculation formula or in the called GetFile function.
Also sorry I obviously didn't explain my problem well. I'll give it another try.
My database is a singe table, a list of people with information such as contact details, job role. Also I use it to manage their onboarding to the role and this involves keeping track of whether a number of activities have completed, each evidenced by the presence of a specific type of document. So for each of these I have a field to show whether done/not done.
Alongside the Access database I have I folder structure: a folder for each person and under that folder a repeating structure to organise the evidence documents. So there's a folder for Joe Bloggs, and under that folder are subfolders for Joe's specimen signature form, scope of practice declaration etc.
There are no forms, so far I haven't seen a need for any.
So now when I get an evidence document I file it away in the appropriate folder and then mark "done" in the corresponding field in the table row for that person. I'm changing this so that the database can go and look for itself to see if the evidence documents are present. I'm creating a query with calculated fields, one for each of the evidence documents. Also I have added into my table a new field "FilePath" to hold the name of the evidence documents folder for the person (I could derive this from their name and other information but I'm leaving that for a later enhancement).
I have a function like this:
Function GetFile(Pathname As String) As String
GetFile = Dir(Pathname, vbNormal)
End Function
Calculated field for Specimen Signature is like this:
Specimen Signature: GetFile([FilePath] & "\Specimen Signature\")
Calculated field for Scope of Practice Declaration is like this:
Scope of Practice Declaration: GetFile([FilePath] & "\Scope of Practice Declaration\")
... and similar for each of the other evidence documents.
This looks very inelegant and so I'd like to have the same code in each of these several fields, and have the lowest level part of the folder name (the "Specimen Signature" or "Scope of Practice Declaration" text string) picked up from the field name, either in the field calculation formula or in the called GetFile function.