The below code is the close routine of an Access App our BA wrote. When executed it is not only closing the Access App but my C# winform app as well, on the same computer. The Access app is named DME Referral and my winform app main process runs in the Task Manager as MATRIX.exe.(Yes I am programming the MATRIX...never allow a group of Social Workers and Nurses to name your program!)
I do not do much with Access(VBA) programming so I am hoping someone here can help.
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
Call ToggleVisible
DoCmd.Quit
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub
Private Sub ToggleVisible()
Me.txtLastNameCrit.Visible = False
Me.txtFirstNameCrit.Visible = False
Me.cmdSearch.Visible = False
Me.cmbCoor.Visible = False
Me.cmdSearchByCoor.Visible = False
Me.txtStartDate.Visible = False
Me.txtEndDate.Visible = False
Me.cmdDMEReport1.Visible = False
End Sub