Re: Search last name and first name combo box



Now I did [Last Name] & ", " & [First Name] in cboFind.

Now how to modify AfterUpdate event?

"smk23" <smk23@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EE411172-2175-4D8A-ACFE-45DE667C5C64@xxxxxxxxxxxxxxxx
You need to define a field in your underlying query definition like
[LastName] & ", " & [FirstName] AS CompleteName and search on that field.
--
sam


"Song Su" wrote:

My continiuse form has 2 separate fields: Last Name and First Name. I
setup
a search combo box and I want user to type last name, (comma and space)
and
continue to type first name to search correct record. My code only search
Last Name. How to do that? Thanks.

Private Sub cboFind_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Last Name] = '" & Me![cboFind] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark

End Sub





.



Relevant Pages

  • Re: search or filter method using lastname,firstname,middle
    ... Private Sub cboGoto_AfterUpdate ... > Basically the users would start at a combo box in my form and use a comma ... > tab to the fields but I want to setup the ability to forgo that method. ...
    (microsoft.public.access.forms)
  • Search last name and first name combo box
    ... I setup ... a search combo box and I want user to type last name, (comma and space) and ... continue to type first name to search correct record. ... Private Sub cboFind_AfterUpdate ...
    (microsoft.public.access.forms)
  • RE: Search Box
    ... created a query that would activate off of the "Search Button".... ... Private Sub cmdSearch2_click ... The query is setup so that all the fields on the form are the same from the ... person enters in johnson it lets them know they have 3. ...
    (microsoft.public.access.forms)
  • Re: date useage in vb expression
    ... now i get why you were putting that comma in the code originally. ... the syntax you used exactly matched the syntax in the Help topic, ... leave out the "Dim rs As Object" line altogether. ... > Private Sub Form_Open ...
    (microsoft.public.access.formscoding)
  • Re: Data Validation List created from a text in a Cell
    ... Private Sub Worksheet_Change ... Whenever the cell containing the comma separated list is changed (specified ... Validation List for the designated range (stored in the ValidationRange ...
    (microsoft.public.excel.worksheet.functions)

Loading