Help
I need when saving a record in my database to be able to save the record also to a different database in a different location
I am using the following code
On Error GoTo ErrorHandler
If IsNull(Office_Type) Or IsNull(Number_Of_Positions) Or IsNull(Helpdesk_Ref) Or IsNull(Approved_By) Or IsNull(Position) Or IsNull(Reason_For_Replacement) Or IsNull(Software_Version) Or IsNull(Requested_By) Or IsNull(Machine_Type) Or IsNull(Which_Cash_Account) Or IsNull(Comms) Or IsNull(Screen_Type) Or IsNull(Person_Spoke_To) Or IsNull(System_Running_Or_Down) Or IsNull(Priority) Then
MsgBox "All Fields are MANDATORY Except Office Contact And If Net Vista ", vbInformation, "IT Helpdesk SUR"
Else
Me.Status = "Sent"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.SendObject acSendReport, "RPTSUR1", acFormatRTF, "", "
[email protected]", "", " System Unit Replacement " & Office, "System Unit Replacement logged by " & Logged_By, False
Me.Status = "Closed"
emailsent = "True"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End If
Thanks