This code is to split a Microsoft Access database and re-connect it on launch so that you can use Access on a multi user network...After Splitting the database manually, place the following code in the form that launches when the database is launched...
code to split (and reconnect) an Access database (part 1)
Public Function BackEndLoc() As String
'BackEndLoc = "\\zeus\Family Documents\Richard's Work\license_keys_be.mdb"
'...............that is the client's location for the file as _
installed. It is commented out as I am working on it locally
BackEndLoc = "\\zeus\Family Documents\Richard's Work\license_keys_be.mdb"
'...............that is the location of my development backend dummy _
data. This is currently active. I will switch the comment-outs when I _
send an update to the client.
End Function
Private Sub Form_Open(Cancel As Integer)
Dim strBEPath As String
' Minimize the database window and initialize the form.
strBEPath = BackEndLoc()
'other stuff
End Sub
Use the real path to the back end on the server in the function.
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.