MSG Box not comming up (1 Viewer)

Nancythomas

Registered User.
Local time
Yesterday, 20:13
Joined
Apr 20, 2010
Messages
59
I have created a multiple field search screen.
The script is attached.

I would like to add a MSG Box "No records found" when the user types in information in any field where no records are available.

Just cannot get this working.

Can you please check my VB script and let me know what is incorrect in this script
Thanks
 

JHB

Have been here a while
Local time
Today, 05:13
Joined
Jun 17, 2012
Messages
7,732
And where is the code? :confused:
 

Nancythomas

Registered User.
Local time
Yesterday, 20:13
Joined
Apr 20, 2010
Messages
59
OOPS!!! here is the attachment
 

Attachments

  • MSG Box VB Script.txt
    2.6 KB · Views: 81

JHB

Have been here a while
Local time
Today, 05:13
Joined
Jun 17, 2012
Messages
7,732
Maybe I miss the point but the code you've shows a MsgBox when the search sting is empty.
So my question is, what exactly do you want to do?
 

Nancythomas

Registered User.
Local time
Yesterday, 20:13
Joined
Apr 20, 2010
Messages
59
I would like a Message box to pop up when a users search for information on any of the fields and if no records are found, this message box should pop up. "No records found". I have written this but it does not work....
 

GinaWhipp

AWF VIP
Local time
Yesterday, 23:13
Joined
Jun 21, 2011
Messages
5,899
That looks like Allen Browne's code and it should pop up if there is nothing returned. Are you saying you do not get a message box? If not, what does happen?
 

Nancythomas

Registered User.
Local time
Yesterday, 20:13
Joined
Apr 20, 2010
Messages
59
Hi gina
When the search string is empty, the pop msg box does not appear. Nothing happens.
I would like the msg box pop up when the result is null
 

GinaWhipp

AWF VIP
Local time
Yesterday, 23:13
Joined
Jun 21, 2011
Messages
5,899
Hmm, that is odd. Are your Search Controls bound or unbound?
 

stopher

AWF VIP
Local time
Today, 04:13
Joined
Feb 1, 2006
Messages
2,395
Like JHB said, the message box will appear when the string is null i.e. when no criteria has been entered in any of the filter boxes. Is this really what you want? Because surely the message should then be "no filter criteria has been entered"

The empty string does not mean "no records found". There is nothing in your code to determine whether any records would be returned from the criteria provided.
 

Users who are viewing this thread

Top Bottom