MS Access - 错误 - 您无权修改网络位置中的文件 [英] MS Access - Error - You don't have permission to modify files in the network location

查看:99
本文介绍了MS Access - 错误 - 您无权修改网络位置中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿, 



我有一个表格有两个文本框作为Source和Target。源获取源路径和目标文本框将文件复制到目标路径。在复制文件时弹出错误,这是运行时错误说"你没有权限
来修改文件网络位置联系人管理员",我是服务器的管理员,写入权限设置为是。当我手动复制文件时,它正在工作,但当我尝试使用此VBA代码进行复制时,它会发出此错误。
虽然考虑到文件被复制但是它仍然放弃了这个错误,任何人都对此有任何想法?
b


正如你在图像中看到的那样的文件被复制,因为我有写权限。此外,当我手动尝试复制其工作没有任何错误。为什么这个错误来了?由于VBA或由于其他原因或VBA没有复制而不是修改? 
$




如果需要,附加是VBA代码 看看:

Hey, 

I have a form that have two text boxes as Source and Target. The Source take the source path and the destination textbox copy the file to the destination path.An error pop up at the time of coping file which is run time error says "You don't have permission to modify files in the network location contact Administrator", i am the administrator of the server and the write permission is set to yes. When i manually copy the file it's working but when i try to copy using this VBA code it's giving this error. Although considering the file gets copied but still it's giving up this error, anyone have any idea about that?

As you can see in the image the file is copied as i have write permission. Also when i manually tried to copy its working without any error.Why is this error coming? Due to VBA or due to something else or VBA is not copying instead modifying? 


Attach is VBA code if require to  look at :

Private Sub txtSource_Click()
 Dim Dialog      As FileDialog
  
    Dim Selected    As Long
    
    Set Dialog = FileDialog(msoFileDialogFilePicker)
   With Dialog
    .AllowMultiSelect = False
    .InitialFileName = Nz(Me!txtSource.Value)
        .Title = "Select file to copy"
        Selected = .Show
        If Selected <> 0 Then
            Me!txtSource.Value = .SelectedItems.Item(1)
            
        End If
    End With
    
    Cancel = True
End Sub

Private Sub txtTarget_Click()
Dim Dialog As FileDialog
    
    Dim Selected    As Long
    Set Dialog = FileDialog(msoFileDialogSaveAs)
    With Dialog
    .AllowMultiSelect = False
    .InitialFileName = Nz(Me!txtSource.Value)
        .Title = "Name saved file"
         '.InitialFileName = "N:\"
         
        Selected = .Show
        DoCmd.SetWarnings False
        
        If Selected <> 0 Then
         Me!txtTarget.Value = .SelectedItems.Item(1)
         TargetFile = .SelectedItems.Item(1)
            If Not IsNull(Me!txtSource.Value) Then
                 FileCopy Me!txtSource.Value, Me!txtTarget.Value
                 Me.txtTarget = Split(TargetFile, ":")(1)
            End If
           ' Application.FollowHyperlink Me.txtTarget
            
        End If
    End With
    
    Cancel = True
   
End Sub


< img alt =""src ="https://social.msdn.microsoft.com/Forums/getfile/1173977">

推荐答案

N:\驱动器一个值得信赖的位置?确保ACCESS将驱动器视为可信位置。
Is the N:\ drive a Trusted Location? Make sure ACCESS considers the drive a Trusted Location.


这篇关于MS Access - 错误 - 您无权修改网络位置中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆