I have a Main form with NAME1 & ACCT.
I currently have a LookUp box that allows you to start typing the NAME1 and it Finds the customer.
When you click Enter, that Customer's information displays fully on the Main Form.
This is the code created by the LookUp Wizard:
--------------------------------
Private Sub Combo23_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NAME1] = '" & Me![Combo23] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Combo23 = "" 'Clears the Look-Up boxes after searching
End Sub
--------------------------------
How do I alter this code to find the Customer:
1) When you only type in a First name
2) or Last Name
3) or Account number etc ?
I need a WildCard search that will display the Customer details on my Form when a User enters anything they remember be it First, Last or Acct number.
(NAME1 is a Text field type; first name <space> last name.)
(ex. John Doe)
(ACCT is a 4 digit Decimal number type) (ex. 3902)
Thanks in advance!
jlig
I currently have a LookUp box that allows you to start typing the NAME1 and it Finds the customer.
When you click Enter, that Customer's information displays fully on the Main Form.
This is the code created by the LookUp Wizard:
--------------------------------
Private Sub Combo23_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[NAME1] = '" & Me![Combo23] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Combo23 = "" 'Clears the Look-Up boxes after searching
End Sub
--------------------------------
How do I alter this code to find the Customer:
1) When you only type in a First name
2) or Last Name
3) or Account number etc ?
I need a WildCard search that will display the Customer details on my Form when a User enters anything they remember be it First, Last or Acct number.
(NAME1 is a Text field type; first name <space> last name.)
(ex. John Doe)
(ACCT is a 4 digit Decimal number type) (ex. 3902)
Thanks in advance!
jlig