Hello,
I have an open form on which there is a Command Button that is intended to open another form and show only records that match a field from the open form and an unbound column in a combo box of the form to be opened.
The result is that the form opens showing all records and in this latest (of many trials) version indicates:
---"Undefined Function '[Forms]![frmReturnDetails]![Combo24].Column' in expression."
Other trials yield the "Type Mismatch" Error. Thanks for your help / time.
Here is my code for the Command Button:
Private Sub Command9__OPEN_frmReturnDetails_Click()
On Error GoTo Err_Command9_Click
Dim stDocName As String
stDocName = "frmReturnDetails"
stLinkCriteria = "[Forms]![frmReturnDetails]![Combo24].Column(2)= ""& Me.OEM_ID & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command9_Click:
Exit Sub
Err_Command9_Click:
MsgBox Err.Description
Resume Exit_Command9_Click
End Sub
I have an open form on which there is a Command Button that is intended to open another form and show only records that match a field from the open form and an unbound column in a combo box of the form to be opened.
The result is that the form opens showing all records and in this latest (of many trials) version indicates:
---"Undefined Function '[Forms]![frmReturnDetails]![Combo24].Column' in expression."
Other trials yield the "Type Mismatch" Error. Thanks for your help / time.
Here is my code for the Command Button:
Private Sub Command9__OPEN_frmReturnDetails_Click()
On Error GoTo Err_Command9_Click
Dim stDocName As String
stDocName = "frmReturnDetails"
stLinkCriteria = "[Forms]![frmReturnDetails]![Combo24].Column(2)= ""& Me.OEM_ID & ""
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command9_Click:
Exit Sub
Err_Command9_Click:
MsgBox Err.Description
Resume Exit_Command9_Click
End Sub