G
Guest
Hello:
I have the following code attached to a command button on a form
Private Sub cmdOpenQAWO_Click()
On Error GoTo Err_cmdOpenQAWO_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWarrantyWO"
stLinkCriteria = "[WONum]=" & Me![List12]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenQAWO_Click:
Exit Sub
Err_cmdOpenQAWO_Click:
MsgBox Err.Description
Resume Exit_cmdOpenQAWO_Click
As a last step, I want to close the form that this button is on. I tried
adding me.close after the last DoCmd but it closes the form that I am
opening, not the form that I am on.
Any help would be appreciated.
Thanks
Brennan
I have the following code attached to a command button on a form
Private Sub cmdOpenQAWO_Click()
On Error GoTo Err_cmdOpenQAWO_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmWarrantyWO"
stLinkCriteria = "[WONum]=" & Me![List12]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenQAWO_Click:
Exit Sub
Err_cmdOpenQAWO_Click:
MsgBox Err.Description
Resume Exit_cmdOpenQAWO_Click
As a last step, I want to close the form that this button is on. I tried
adding me.close after the last DoCmd but it closes the form that I am
opening, not the form that I am on.
Any help would be appreciated.
Thanks
Brennan