C
cunger28
I have a subform (sub_CompleteInstalls) that has a simple search function
added. Search button (cmd_Search) simply has the syntax:
Private Sub cmd_Search_Click()
Forms![sub_CompleteInstalls].Form.Requery
End Sub
The two search fields are labeled as [srch_WO] and [srch_Tech] within my
subform.
With the sub form opened by itself the code works and requeries just fine.
This sub form is then placed inside the main form (main_NetPromoter).
Whenever I double click the main form to open it. I first receive an Enter
Parameter Value prompt for my two search fields
Forms!sub_CompleteInstalls!srch_WO
Forms!sub_CompleteInstalls!srch_Tech
Once the main form opens, I then click the search button (cmd_Search) only
to receive a VBA error:
"Run-time error '2465':
Microsoft Office Access can't find the field 'sub_CompleteInstalls' referred
to in your expression."
I'm thinking it has to do with the syntax in my subform Search command button
Forms![sub_CompleteInstalls].Form.Requery
Thanks,
added. Search button (cmd_Search) simply has the syntax:
Private Sub cmd_Search_Click()
Forms![sub_CompleteInstalls].Form.Requery
End Sub
The two search fields are labeled as [srch_WO] and [srch_Tech] within my
subform.
With the sub form opened by itself the code works and requeries just fine.
This sub form is then placed inside the main form (main_NetPromoter).
Whenever I double click the main form to open it. I first receive an Enter
Parameter Value prompt for my two search fields
Forms!sub_CompleteInstalls!srch_WO
Forms!sub_CompleteInstalls!srch_Tech
Once the main form opens, I then click the search button (cmd_Search) only
to receive a VBA error:
"Run-time error '2465':
Microsoft Office Access can't find the field 'sub_CompleteInstalls' referred
to in your expression."
I'm thinking it has to do with the syntax in my subform Search command button
Forms![sub_CompleteInstalls].Form.Requery
Thanks,