Search function chokes if there is no match ...

Steff_DK

Registered User.
Local time
Today, 18:04
Joined
Feb 12, 2005
Messages
110
I'm taking a (long) shot at a customer database, with a search function.
The search function I pinched somewhere on this forum (can't remember who was the father, but it's really neat, so thanks whoever you are!!!)

I run into trouble when there is no match, and I attempt to clear the search field and set the source back to a query with all records.

I need your help guys :o

Pls take a look at the attached file (and sorry about the "yak" which is actually Danish :p )

If you need a dictionary:
Søg=Search
Luk=Close
Gem=Save
Tilføj=Add
Ny=New

Thanks y'all
 

Attachments

It looks like it works fine if you use the .Value property rather than the .Text property. You also have the added benefit that you do not need to set the focus to the control to change the .Value property. It is also the default property and as such need not be specified, ie: Me.TextBox = "" is the same as Me.TextBox.Value = ""
 

Users who are viewing this thread

Back
Top Bottom