Option Compare Database
Option Explicit
Function Transfer(vPath)
'1st location file
On Error GoTo TransferError
If IsNull(vPath) Then
MsgBox "Please enter a path first"
Else
DoCmd.TransferDatabase acExport, "dBase IV", vPath, acTable, "Location File", "Loc.dbf"
DoCmd.Echo True, "Loc.dbf Export OK"
DoCmd.TransferDatabase acExport, "dBase IV", vPath, acTable, "Account File", "Acc.dbf"
DoCmd.Echo True, "Acc.dbf Export OK"
DoCmd.TransferDatabase acExport, "dBase IV", vPath, acTable, "Reinsurance File", "Re.dbf"
DoCmd.Echo True, "Re.dbf Export OK"
MsgBox "All Exports Ok"
End If
GoTo GracefulExit
TransferError:
If Err = 3010 Then
MsgBox "File already exists. Please delete old .dbf files first."
Else
MsgBox "Trouble: " & "Error " & Err & ": " & Error$
End If
GracefulExit:
End Function
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
TRUSTED BY
ASKER