Use text box to filter list box - almost, but not quite...

P

Piers 2k

Hi folks,

Having problems with the Event Procedure...

Simple Form:
Text box (named text1) to enter criteria.
List box below (named list2), getting records from field in table.

Went into RowSource property of list box. Modified the criteria to this:
Like "*" & [Forms]![Form1]![Text1] & "*"

User can now type anything into the text box, click cmd button and
list1.requery works.

I'm trying to change it so that as the user types, it automatically filters
the list box. For some reason, putting it into the Change event has no
effect, except when I delete all the criteria?? I thought it should? If I
put it into something like AfterUpdate, it works fine once I tab out of the
text box, but that's not what I'm after.

Any ideas folks?

Thankx in advance,

Piers.
 
P

Piers 2k

Tried it, but I get strange results.

The keyPress only seems to work when I TAB INTO the field.

I've tried KeyUp as well. This does the same as above? My machine seems
fine, but is it? Is CHANGE meant to do what I intend it to do.

Piers
 
P

Paul

I use a similar system (but filtering a subform rather than a list box) and
Change event works fine with that. Change should do exactly what you are
asking of it. Maybe there is some other setting (like an event on keypress)
that is interfering.

I'd move everything onto a new form in a new db just to check that there
isn't some conflict with other settings.
 

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