Another way of doing this is to do the following:
Create an option group with two options (toggles, radio, check, etc...).
The option values should be 1 and 2 when they are created.
Create an unbound text box that will be the search criteria.
Create two queries, one to search for the invoice number based on the search criteria entered in the text box and one to search for the customer name based on the info typed in the text box.
Create a command button that will modify the rowsource on where you wish to display the data found (i.e. form, list box, etc...). If option one is selected, it makes the first query (invoice) be the record source and if the second option is chosen it makes the second (customer) query be the rowsource.
That way the user can choose what they want to search by (either invoice or name) and then enter the criteria to search for.
Code example for the button. Run it on the on-click event.
Select case me.grpOptions
Case 1
With me.lstSearch
.RowSourceType = "Table/Query"
.RowSource = "qryInvoice"
End With
Case 2
With me.lstSearch
.RowSourceType = "Table/Query"
.RowSource = "qryName"
End With
End select
me.grpOptions is the name of your option group.
me.lstSearch is the name of an unbound list box on your form which is where the results of the query will be displayed.
HTH