Currently i have transfer button inside my access application to transfer value to another server.
However i have difficulty when the server name is changed i should update the code in the application.
Instead of that can i remove the server name inside the access code and put it in the notepad?
so if in the future the server name change again i only should update the notepad, not the access application itself.
If can can you let me know how? thanks very much.
please find my code below:
Private Sub cmdTransfer_Click()
Dim strSource As String
Dim strABCTarget As String
Dim strDEFTarget As String
On Error GoTo Err_cmdTransfer_Click
strSource = "I:\Appl\Rate.accdb"
strABCTarget = "\\indln1\Shared\Appl\Rate.accdb"
strDEFTarget = "\\indrel1\Shared\Appl\Rate.accdb"
DoCmd.Hourglass True
FileCopy strSource, strABCTarget
FileCopy strSource, strDEFTarget
DoCmd.Hourglass False
MsgBox "Transferring is completed...", vbInformation
Exit_cmdTransfer_Click:
Exit Sub
Err_cmdTransfer_Click:
DoCmd.Hourglass False
MsgBox Err.Description & "." & " Transfer failed.", vbExclamation
Resume Exit_cmdTransfer_Click
End Sub