I am trying to have a record saved when i click on my "Resolve Alarm and Close Tkt" button on my "ARMS Single Tkt Display" form. This process is supposed to save the record to the "ChronicTkt# T" table , then copy it to the "ClosedTktT", then delete it from the "ChronicTkt# T". The problem I have is that when I type "Yes" in the "Close Tkt" field in my form, it does not save the text when copying over to the new table(ClosedTktT). Also, all records are copied on just the record I am on.
Please see my attached dB file.
My VBA code from my Button
Private Sub Save_and_Close_Form_Click()
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_SELECTRECORD
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Save
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Refresh
DoCmd.Requery
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO [ClosedTktT] SELECT * FROM [ChronicTkt# T] WHERE [Chronic Tkt Number] = [Chronic Tkt Number]"
DoCmd.SetWarnings True
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_SELECTRECORD
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_DELETE
DoCmd.Close
End Sub
Please see my attached dB file.
My VBA code from my Button
Private Sub Save_and_Close_Form_Click()
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_SELECTRECORD
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Save
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Refresh
DoCmd.Requery
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO [ClosedTktT] SELECT * FROM [ChronicTkt# T] WHERE [Chronic Tkt Number] = [Chronic Tkt Number]"
DoCmd.SetWarnings True
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_SELECTRECORD
DoCmd.DoMenuItem A_FORMBAR, A_EDIT, A_DELETE
DoCmd.Close
End Sub