Can anyone help me, I am trying to add a close statement to a procedure
to close the current and then open the next window. I am working with
command8 below.
Option Compare Database
Private Sub Combo20_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[TAX KEY NO] = '" & Me![Combo20] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Private Sub Command6_Click()
On Error GoTo Err_Command6_Click
DoCmd.GoToRecord , , acNewRec
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
Private Sub Command8_Click()
On Error GoTo Err_Command8_Click
THIS IS WHERE I NEED TO ADD A CLOSE STATEMENT TO CLOSE THE WINDOW THIS
BUTTON IS LOCATED ON. IT IS "Edit or Add Tax Key form" WINDOW BEFORE IT
OPENS THE "Permit Data Entry" WINDOW.
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Permit Data Entry"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command8_Click:
Exit Sub
Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click
End Sub
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Main Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox Err.Description
Resume Exit_Command11_Click
End Sub