I want to create a user form where the user will enter an order number, click on a custom search button and display the results: Order number, Serial Number, Site ID part of my query.
I have the query, which contains the Forms![mainForm]![OrderNumber] which point to the unbound field for order number input. I have created a command button and in there I have on click [event procedure] and
For the VB code
on the cmdfilter
Private Sub cmdfilter_click()
Dim strwhere as string
Dim ingleg as long
If not Is null (me txtfilterOrderNumber) then
strWhere = strWhere & "([OrderNumber]) like ""*" & me.txtfilterOrderNumber & "*"") and "
End if
End Sub
I want to populate on the bottom 3 fields Order number, Serial Number and Site ID already pointing to the query on the control source
when i enter an order number and click find it nothing happens. If i navigate through the next button on the bottom i see information feeding to the 3 fields, but when i enter an order number nothing happens. what I am missing? Please help.