Results 1 to 8 of 8
  1. #1
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276

    Split Database - Not Working over Network

    I have a form where I link files which are saved to a Path: H:\2019 Ledger\Office Attachments 2019\Gujranwala\GUJ Purchase
    Before I splited the DB it was working perfectly. Now after the split no files can be saved or linked.
    Can someone help me with this.


    Private Sub AttachmentA_Click()
    Dim fDialog As Object
    Dim oldFileName As String, OldFilePath As String


    Dim NewFileName As String, NewFilePath As String
    Dim varFile As Variant




    If IsNull(AttachmentA) Or AttachmentA.Text = "" Then
    NewFilePath = "H:\2019 Ledger\Office Attachments 2019\Gujranwala\GUJ Purchase"


    ' Set up the File Dialog. '
    Set fDialog = Application.FileDialog(3)
    With fDialog
    ' Set the title of the dialog box. '
    .Title = "Please select the image to attach"


    ' Clear out the current filters, and add our own.'
    .Filters.Clear
    .Filters.Add "All Files", "*.*"
    .AllowMultiSelect = False
    If .Show = -1 Then
    oldFileName = .SelectedItems(1)
    NewFileName = NewFilePath & Format(PurTransId.Value, "0000") & " " & "CoID-" & PurCoId.Value & " " & [EntryPLogin By].Value & " GUJPur-Att1." & Right(oldFileName, 4)
    FileCopy oldFileName, NewFileName
    AttachmentA = NewFileName
    Else
    MsgBox "File selection cancelled!"
    Exit Sub '<< code may attempt to follow hyperlink when no file was selected. Then again, maybe not but I would Exit to be sure
    End If
    End With


    Else
    If Dir(AttachmentA.Text) <> "" And AttachmentA.Text <> "" Then
    Application.FollowHyperlink AttachmentA
    Else
    MsgBox ("Attachment Deleted & Does Not Exist In Attachment Folder" & vbNewLine & "Check Attachment Or Remove This Invalid Path." & vbNewLine & vbNewLine & "To Remove HIGHLIGHT The PATH & Use BACKSPACE Button."), vbExclamation
    End If
    End If
    End Sub








    Private Sub AttachmentA_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 46 Then
    result = MsgBox("Do you wish to delete the file?", vbYesNo)
    If result = vbYes And Dir(AttachmentA.Text) <> "" Then
    Kill (AttachmentA.Text)
    Else
    MsgBox ("Operation Cancelled"), vbInformation
    KeyCode = 0
    End If
    End If
    End Sub

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Now after the split no files can be saved or linked.
    What exactly did you try?

  3. #3
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    I have not tried anything as I have no clue how to fix it

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I suggest you start with a few youtube videos
    watch a few to see some variety of presentation.

    I recommend Google/Bing with criteria youtube split ms access database
    to get a list of videos.

    Here is an FMS article also

    Good luck

  5. #5
    dashiellx's Avatar
    dashiellx is offline Falconer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Location
    Baltimore
    Posts
    49
    I would also highly suggest that you confirm that you have both read and write permissions to the directory where you placed the back end.

  6. #6
    aamer is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Jul 2010
    Location
    Pakistan
    Posts
    276
    found the problem and have fixed the same.

    all I had to do was to change the 'NewFilePath' to the network path and its working perfectly

    NewFilePath = "\\ANT-DESKTOP\2019 Ledger\Office Attachments 2019\Gujranwala\GUJ Purchase"





    Private Sub AttachmentA_Click()
    Dim fDialog As Object
    Dim oldFileName As String, OldFilePath As String
    Dim NewFileName As String, NewFilePath As String
    Dim varFile As Variant








    If IsNull(AttachmentA) Or AttachmentA.Text = "" Then
    NewFilePath = "\\ANT-DESKTOP\2019 Ledger\Office Attachments 2019\Gujranwala\GUJ Purchase"




    ' Set up the File Dialog. '
    Set fDialog = Application.FileDialog(3)
    With fDialog
    ' Set the title of the dialog box. '
    .Title = "Please select the image to attach"




    ' Clear out the current filters, and add our own.'
    .Filters.Clear
    .Filters.Add "All Files", "*.*"
    .AllowMultiSelect = False
    If .Show = -1 Then
    oldFileName = .SelectedItems(1)
    NewFileName = NewFilePath & Format(PurTransId.Value, "0000") & " " & "CoID-" & PurCoId.Value & " " & [EntryPLogin By].Value & " GUJPur-Att1." & Right(oldFileName, 4)
    FileCopy oldFileName, NewFileName
    AttachmentA = NewFileName
    Else
    MsgBox "File selection cancelled!"
    Exit Sub '<< code may attempt to follow hyperlink when no file was selected. Then again, maybe not but I would Exit to be sure
    End If
    End With




    Else
    If Dir(AttachmentA.Text) <> "" And AttachmentA.Text <> "" Then
    Application.FollowHyperlink AttachmentA
    Else
    MsgBox ("Attachment Deleted & Does Not Exist In Attachment Folder" & vbNewLine & "Check Attachment Or Remove This Invalid Path." & vbNewLine & vbNewLine & "To Remove HIGHLIGHT The PATH & Use BACKSPACE Button."), vbExclamation
    End If
    End If
    End Sub

  7. #7
    Join Date
    Apr 2017
    Posts
    1,673
    You did split the database, and did get 2 files (front- and back-end) in same directory? And then you moved the back-end to another directory?

    You had to open the front_end in design mode, to locate in menu and open Linked Table Manager, to select all linked tables, and to point the new back-end location for them.

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    aamer,

    Glad you have it resolved. Arvi has listed the steps involved.

    In future, please surround your code with tags for improved readability.
    --Highlight the vba/SQL involved, then click the octothorpe/hash sign/# sign in the header

    Good luck.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Split DB over slow network
    By Mclaren in forum Database Design
    Replies: 7
    Last Post: 07-31-2018, 05:55 AM
  2. Replies: 3
    Last Post: 01-11-2018, 12:04 PM
  3. Replies: 5
    Last Post: 02-27-2016, 09:46 AM
  4. Slow split database on network
    By riteoh in forum Access
    Replies: 9
    Last Post: 11-09-2012, 02:28 PM
  5. Working on a split database at home
    By ksmith in forum Programming
    Replies: 7
    Last Post: 05-23-2011, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums