goto record in listbox rowsource

  • Thread starter Thread starter Henrik Thierry
  • Start date Start date
H

Henrik Thierry

Hi

I have a problem. Im trying to list all my records in a listbox, and when i
push a button the first record that fullfills the following query should be
selected

query = listbox.find ("mykey like '" & me!strkey & "%')

Hope someone out there is able to help me

:o) Henrik
 
I would convert the listbox to a continues form is you need to find on it.

You can then go:

me.ReocrdSetClone.FindFirst "mykey like '" me!strkey & "*'"
if me.RecordSetClone.NoMatch = false then
me.bookmark = me.RecordSetClone.BookMark
endif

Note how I used the "*" in place of "%".

For some nice screen shots of a continues form, take a quick read of the
following:

http://www.attcanada.net/~kallal.msn/Articles/Grid.htm
 
Back
Top