Another ComboBox ?

  • Thread starter Thread starter Mike J
  • Start date Start date
M

Mike J

I have a comboBox with a query for the Row Source, bound
to column 1(Last Name). Is there any way to findrecord on
two columns. In other words I want to pick the entry in
the list and find the record based on column 1 and 4(ID).
 
Yes. reference the columns by combobox.column(0) and combobox.column(3) ( a
zero based system). Use these variables in your findnext statement. Use the
after update event of the comtrol like so:
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[LastName] = " & Str(Nz(Me![ComboBoxName].Column(0), 0)) &
" AND [ID] = " _
& Str(Nz(Me![ComboBoxName].Column(3) , 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
Back
Top