Seach subform example db

AmyLynnHill

Registered User.
Local time
Today, 14:33
Joined
Dec 7, 2005
Messages
81
Greetings, I found an example of a search example on this forum a few months ago an have been trying to build something similar but have a few bugs. I have a search form at the start of the application, a txtSearch field to type the text to search, below is an unbound field attached to a query "lstResults". on the "lstResults" dbl click event there is have a method FINDIT().
I'm new at using methods and VB. There are two issues I'm having with this method
1. This code
If IsNull(Me.lstResults) Then
MsgBox " This is not working correctly ", , "SuperSearch"
The message appears even thou the lstResults is not null

2. If a record is found a "type mismatch" appears??

Can anyone help me trouble shoot what I"m doing wrong?
an example for the names to search are: Mary BartIRomo and Mary Horn.
I've attached the copy of the database I copied from the forum and my copy. Any assistance would be greatly appeciated, I've been working on this for days! Thanks.
 

Attachments

Just had a very quick look at it and if you change the IsNull(Me.lstResults) to IsNull(Me.lstResults.Column(3)) (Your bound column) it opens the desired form. There is another error but that will get you further along the line.
 
Thank you that worked and did get me further. I'll continue to try to figure out the "Ivalid use of Null"...Greatly appeciated!
 

Users who are viewing this thread

Back
Top Bottom