Yes and yes, if IT manager sets open permissions on the destination folder.
Local table or label on form, doesn't matter, same principle. Code compares value in frontend against value in backend table.
Yes and yes, if IT manager sets open permissions on the destination folder.
Local table or label on form, doesn't matter, same principle. Code compares value in frontend against value in backend table.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
All right. I think I've mostly got what I need, then. I just need to check one last thing with you. The text in green is the change I already know I need to make; the text in red, I'm assuming that's the directory the file is located in, correct? C:\Program\etc\etc?
Code:If Me.tbxVersion <> Me.lblVersion.Caption Then'copy Access file CreateObject("Scripting.FileSystemObject").CopyFile _ gstrBasePath & "Program\Install\MaterialsDatabase.accdb", "p:\", True 'allow enough time for file to completely copy before opening Dim Start As Double Start = Timer While Timer < Start + 3 DoEvents Wend 'load new version - SysCmd function gets the Access executable file path 'Shell function requires literal quote marks in the target filename string argument, hence the quadrupled quote marks Shell SysCmd(acSysCmdAccessDir) & "MSAccess.exe " & """" & CurrentProject.FullName & """", vbNormalFocus 'close current file DoCmd.Quit End If
Don't see any green text.
Yes for the red. That's the location of the new version that needs to be copied. Program is a folder under the gstrBasePath, which is a global variable I declare in a general module. It is set to a string that uses UNC pathing, like:
\\servername\folderpath\
If you use a drive letter pathing, user must have that drive mapped with Windows on their computer. Does everyone have a drive p:\ mapped?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes, everyone that will need to have access to this file will have the P:\ drive mapped. From what I remember of the command you're using, the C:\ (in yours) or P:\ (in mine) drive is the location where the file will be copied *to*, correct?
As for the red, instead of defining a variable, could I just input the entire file path? \\Servername\filepath\filename? I might regret this down the road, but at the moment I don't have any need to declare the filepath as a global variable.
Yes, of course you can code the entire path directly instead of concatenating variable.
You do understand the destination must be different for every user? Each user needs to open and run their own copy of the frontend, not a shared frontend. Is P:\ on the local workstation or on the central file server? C:\ works because that is saving the file to local hard drive, not to a common location on the server.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
That's exactly why I chose the P:\ drive in this case. It's the same location for everybody that's different: it's a "personal" drive. So the network mapping is the exact same for everyone, it just puts them into their own area. I'm hoping that explanation makes as much sense as it does in my head. I'm going to be testing this out momentarily, so fingers crossed.
I tried that and ran into the IT permissions issue. Could not programmatically copy file into personal folder.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Just wanted to poke in and let you know that it worked almost perfectly.
They're getting non-exclusive access errors when the update functionality kicks in, but I suspect that's due to needing to increase the delay that you have built in to it already. But your thoughts/feedback would be appreciated on that one!
Don't remember ever having that issue. Try increasing the delay and see what happens.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.