×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Filter-by-Form: No returns problem

Filter-by-Form: No returns problem

Filter-by-Form: No returns problem

(OP)
Have created a Filter-by-form facility and have successfully restricted the search fields to only those I want the user to be able to search on. (Drop-down combo boxes present user with all values).

This works fine if the user chooses one field on which to search.  However, if they choose combinations of fields it is quite likely that no records match the criteria.  When this occurs the whole of the Details section of the form is blanked out - I mean all fields completely disappear!. What's more the screen seems to freeze in this condition and I have to close it down and re-open it to return things to normal.

Can anyone tell me what's happening here and can anyone tell me how I can trap this condition in VBA so that I can handle it smoothly? I realise I could try and disable all the other fields when one is chosen so the user can only search on one at a time, but I see logistical problems doing it that way.  I just want to trap it, inform them, and let them try again. Ta!

Steve House
shouse@icaew.co.uk
The Inst of Chartered Accts of England & Wales

RE: Filter-by-Form: No returns problem

In the form where you are receiving the results, place a hidden text box. Set this textbox Control Source to:

=Count(*)

This can be used to evaluate if the query returned any records. You'll have to write a conditional statement so if the textbox = 0 then a message box saying "No Records Returned"......, then another line to the close the form.

HTH
RDH

Ricky Hicks
rdhicks@mindspring.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close