A
Anne
I created a simple search on an existing form called FrmSales. The search
opens a search results form which was created from a query. I want the user
to be able to double click a job to select it and return to Form sales with
that job information displayed. It works, what I cannot get to work is
closing the search from. Below is the code:
Private Sub txtJobID_DblClick(Cancel As Integer)
On Error GoTo Err_JobID_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[JobID]=" & Me.txtJobID
stDocName = "FrmSales"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "FrmSalesJobSearch", acSaveYes
Exit_txtJobID_Click:
Exit Sub
Err_JobID_Click:
MsgBox Err.Description
' Resume Exit_JobID_Click
End Sub
opens a search results form which was created from a query. I want the user
to be able to double click a job to select it and return to Form sales with
that job information displayed. It works, what I cannot get to work is
closing the search from. Below is the code:
Private Sub txtJobID_DblClick(Cancel As Integer)
On Error GoTo Err_JobID_Click
Dim stDocName As String
Dim stLinkCriteria As String
stLinkCriteria = "[JobID]=" & Me.txtJobID
stDocName = "FrmSales"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "FrmSalesJobSearch", acSaveYes
Exit_txtJobID_Click:
Exit Sub
Err_JobID_Click:
MsgBox Err.Description
' Resume Exit_JobID_Click
End Sub