[AccessD] CBO Not In List

Gustav Brock gustav at cactus.dk
Thu Oct 2 08:56:49 CDT 2003


Hi John

Have a look in the archive for "Type Ahead in ListBox", Feb. 2002.

I guess you could use the same technique for a combobox perhaps by
setting AutoExpand to False.

Insert a DoCmd.Beep after this line:

       If .NoMatch Then

/gustav


> I want to use the NotInList to open an initial data entry form if the person
> searched for isn't in the database, else open a tabbed form if they are.  I
> have this working using NotInList to open the IDE form and the after update
> to open the tabbed form to the record of the person found in the combo.

> However, what I want to do now is to have the combo start beeping as the
> person types if the item is not in the list.  IOW, NotInList only fires as
> the user EXITS the combo and the item is not in the list.  However if the
> user is typing in a person's name - JOHN COLBY, and by the time she types
> the O in COLBY the combo is not finding the name, the combo should start
> beeping so that the user is notified to stop typing and tab out to trigger
> NotInList and open the data entry form - or even programatically tab out and
> trigger the NotInList.

> It seems like it could be accomplished by checking the insertion point and
> the length of the data in the combo.  If the data exists, the insertion
> point is in the middle of the data that the combo is following, whereas as
> soon as the data is not found, the insertion point is at the end of the
> data.  IOW, if the insertion point is at the end of the data TWICE, then we
> are at a true "not found" and trigger NotInList.  In fact it seems like the
> combo should have been built this way to begin with.

> Has anyone ever done this?

> John W. Colby
> www.colbyconsulting.com



More information about the AccessD mailing list