Im sorry to say but I am very green to VBA but after much reading and things going over my head im still not sure im going about my problem the right way.
What I have and trying to do is:-
Im building a access program to manage the admin and job management for a business doing building approvals and inspections, I am already using and plan to run in conjuntion with the access program onedrive to hold all the files, like plans etc and the photos that go along with the inspections. I am planning to have a file location in access and in onedrive for each separate job.
I am going to use sharepoint as the backend and the program is going to be used on 3-5 different computers.
I want to be able to put a link or command button on each job file in access to open the onedrive file for that job but it contains two variables that I need to add into the destination line, one being the User of the computer and the other being the file number
the code so far
I basically want the hyperlink to end up looking something like this C:\Users\Allan\OneDrive\PCA work\Jobs\16-129 Lot 34 Foxtail St Fern BayCode:Private Sub JobFile_Click() Dim UserName As String UserName = Allan Dim JobFile As String JobFile = Me![JobFile] Application.FollowHyperlink "C:\Users\UserName\OneDrive\PCAwork\jobs\Jobfile" End Sub