Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Button

Status
Not open for further replies.

jdwm2310

Technical User
Jul 26, 2001
396
US
Hi Guys,

I have a question regarding a "Save Button" I have on a form. I want the user to click on this button: after they complete a form. The button should asked the user whether the ticket is closed. If the user clicks on yes then the the button will save the ticket and mark it close on a combobox labeled "Ticket Status".
IF the user clicks on No, a question is asked as to "what would you like to do route it or leave it open" If the user selects route to: The "Route To" combobox will be enabled and will saved the ticket. if the user selects open: the ticket will be saved and will be mark open.

This is what i have done which i know is wrong but hopefully someone can tweak it..thanks



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("What would you like to do?", vbRouteOpen + vbQuestion) = vbRoute
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
 
Hi,

I get a compile error: Invalid use of property and ".Enabled" is highlighted...Any idea why????
 
There are far more experienced people on here than me but which ".Enabled" is highlighted?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top