goto record in listbox rowsource

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

:eek:) Henrik
 
A

Albert D. Kallal

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top