J
jon
Hi
On a form I want to open another form with the relevant information from the
selected information in a subform.
When I run the code I get an error saying it can't find the field
'Top10failingComponetes subform' referred to in your expression.
I have try several times to make sure all is right but to no avail.
I have pasted the code below.
Thanks
Jon
Private Sub cmbAnnalisisForm_Click()
On Error GoTo Err_cmbAnnalisisForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Frm-Componet-Annalisis"
With Me.[Top10FailingComponetes subform].Form![Job]
If IsNull(.Value) Then
Else
stLinkCriteria = "[job]=" & .Value
DoCmd.OpenForm stDocName, WhereCondition:=stLinkCriteria
End If
End With
Exit_cmbAnnalisisForm_Click:
Exit Sub
Err_cmbAnnalisisForm_Click:
MsgBox Err.Description
Resume Exit_cmbAnnalisisForm_Click
End Sub
On a form I want to open another form with the relevant information from the
selected information in a subform.
When I run the code I get an error saying it can't find the field
'Top10failingComponetes subform' referred to in your expression.
I have try several times to make sure all is right but to no avail.
I have pasted the code below.
Thanks
Jon
Private Sub cmbAnnalisisForm_Click()
On Error GoTo Err_cmbAnnalisisForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Frm-Componet-Annalisis"
With Me.[Top10FailingComponetes subform].Form![Job]
If IsNull(.Value) Then
Else
stLinkCriteria = "[job]=" & .Value
DoCmd.OpenForm stDocName, WhereCondition:=stLinkCriteria
End If
End With
Exit_cmbAnnalisisForm_Click:
Exit Sub
Err_cmbAnnalisisForm_Click:
MsgBox Err.Description
Resume Exit_cmbAnnalisisForm_Click
End Sub