Lookup and copy file in ms access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 73429
    New Member
    • Aug 2020
    • 7

    Lookup and copy file in ms access

    Hi
    i have a MS access data base with multiple users running on it and i"m using the attach a file option and slows down the application i would like to create a CMD that should open file dialog and ask user to select the file that he wants to attach and it should copy the file to a different folder and copy link in a field
  • cactusdata
    Recognized Expert New Member
    • Aug 2007
    • 223

    #2
    Use the
    Code:
    Application.FileDialog
    to pick the file, then
    Code:
    VBA.FileCopy
    to copy it. Finally, link it with
    Code:
    DoCmd.TransferDatabase
    , if that is what you mean with "copy link".

    Comment

    • 73429
      New Member
      • Aug 2020
      • 7

      #3
      thanks for your answer i do have no an issue that the file does not open when you click on the link since its located on a server how do i set that all files should automatically get the quotation after inserting into field
      thanks for your help

      Comment

      • cactusdata
        Recognized Expert New Member
        • Aug 2007
        • 223

        #4
        Sorry, but I don't understand your question. It should make no difference where the file is located.

        Comment

        • 73429
          New Member
          • Aug 2020
          • 7

          #5
          when its stored in a network location you need to add double quotations in the beginning of the link and the end in order it should work

          Comment

          Working...