Hi,
On my save button: when the user clicks on it,they will be asked "if the ticket is closed?" If they select yes...the ticket status combobox will show "closed" and the ticket will be saved...
If however they select "No"....then they will be prompt with another message box which states "would you like to route the ticket?" if they select yes the Route to combobox will enabled. The ticket will be saved and the ticket status combobox will show "Routed to" If they select No then the ticket will be saved and the Ticket Status combobox will show "Open"
I try playing with a code I hope someone can give me some pointers on this one thans:
Private Sub Save_Click()
On Error GoTo Err_Save_Click
If MsgBox("Is this Ticket Close?", vbYesNo + vbQuestion) = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Solved_by.Enabled
Me.Date_Closed.Enabled
Me.Ticket_Status = "Closed"
Else
MsgBox("Would you like to Route this ticket?", vbYesNo + vbQuestion) = vbYes
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Route_To.Enabled
Me.Date_Routed_1.Enabled
Me.Ticket_Status = "Routed"
Exit Sub
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub
On my save button: when the user clicks on it,they will be asked "if the ticket is closed?" If they select yes...the ticket status combobox will show "closed" and the ticket will be saved...
If however they select "No"....then they will be prompt with another message box which states "would you like to route the ticket?" if they select yes the Route to combobox will enabled. The ticket will be saved and the ticket status combobox will show "Routed to" If they select No then the ticket will be saved and the Ticket Status combobox will show "Open"
I try playing with a code I hope someone can give me some pointers on this one thans:
Private Sub Save_Click()
On Error GoTo Err_Save_Click
If MsgBox("Is this Ticket Close?", vbYesNo + vbQuestion) = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Solved_by.Enabled
Me.Date_Closed.Enabled
Me.Ticket_Status = "Closed"
Else
MsgBox("Would you like to Route this ticket?", vbYesNo + vbQuestion) = vbYes
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Route_To.Enabled
Me.Date_Routed_1.Enabled
Me.Ticket_Status = "Routed"
Exit Sub
Exit_Save_Click:
Exit Sub
Err_Save_Click:
MsgBox Err.Description
Resume Exit_Save_Click
End Sub