UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Prevent Users From Linking Images Stored On Their Drive, Access 2016    
 
   
ciapul12
post Jun 29 2020, 03:16 AM
Post#1



Posts: 311
Joined: 7-June 14



Hi There,
I have this particular issue where my users are linking inspection images stored on their personal drive which goes against the principles of this system.
Inspections are done daily and once per week we generate weekly report with the last few pages being the images showing the nature of the problem however in cases where user linked images from their personal drive, the report won't be able to display those images no one has access to that location apart from this particular user...

Anyways, I was wondering if there's a way to prevent this. Ideally this would be driven by a code which would be executed once user tries to link images at which point the code would check hyperlink and
Only hyperlink that starts with drive letter S can be accepted, anything else must must be prompted with error message that this location isn't allowed....
Any hyperlink which starts with letter H is a location of personal drive and full link typically looks like that: ‪H:\Pictures\Picture.JPG

Thank You in advance.

Dan
Go to the top of the page
 
jleach
post Jun 29 2020, 04:08 AM
Post#2


UtterAccess Administrator
Posts: 10,588
Joined: 7-December 09
From: St. Augustine, FL


Hi,

Usually with document tracking it's better to let the application handle the storage (and to not let users interact directly with the stored images).

So, the user might select an image from their local drive, but the application would be responsible for making a copy of that image and placing it into a network directory that each frontend has access to. Then, if someone wants to view the file, it'd copy it from that source directory into a local temp directory to open for the user.

This lets the application itself manage the documents, rather than users (which usually doesn't go well, between people renaming, moving, deleting, etc).

hth

--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 
ciapul12
post Jun 29 2020, 04:14 AM
Post#3



Posts: 311
Joined: 7-June 14



Thanks for your response.
Have you got an example of code that does this?

Dan
Go to the top of the page
 
jleach
post Jun 29 2020, 04:38 AM
Post#4


UtterAccess Administrator
Posts: 10,588
Joined: 7-December 09
From: St. Augustine, FL


More direct to your question though, you should be able use the BeforeUpdate event (either of the control or the form) to look for this, in conjunction with the Left() function. Something like this:

CODE
MyControl_BeforeUpdate(Cancel As Integer)
  If Nz(Me.MyControl.Value, "") <> "" Then
    If Left(Me.MyControl.Value, 2) = "H:" Then
      MsgBox "Please don't link to this path, choose another"
    End If
  End If


--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 
jleach
post Jun 29 2020, 04:41 AM
Post#5


UtterAccess Administrator
Posts: 10,588
Joined: 7-December 09
From: St. Augustine, FL


Regarding file saving/copies, etc., I do not myself, but I know there's at least one good demo out there on how to do it (I'll wait for someone else to jump in).

On the other hand, the FileCopy statement is pretty straightforward: https://docs.microsoft.com/en-us/office/vba...ecopy-statement

CODE
FileCopy "H:\SomeFile.jpg" "\\SomeServer\Share\file.jpg"



--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th July 2020 - 07:37 AM