No Records Found

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi...
I've set up a dialog box/query/form for our database that will allow you to
select criteria from two combo boxes that runs a query that runs a query that
then shows those records in a form. The two fields are Carriers and Acct#.
It works if you select one or the other or both. Right now it works fine,
but I have two things I want to do. First, how can I set it up so that if
someone selects a Carrier that the account numbers associated with that
Carrier are the only ones in the combo list. Second, if there are no records
found with their criteria, I want a message that comes up saying 'no records
found' and then hitting OK closes the form. Right now the form just comes up
empty.

Thanks for any help. Please let me know if you need more info.
Jenny
 
you can use the dlookup("field","table or query","criteria") to determine
what is the single item on your combobox, and you can also use
DCount("field","table or query","criteria") to check if there is a record on
your table
 
In answer to your first question, please see the following KB article:

How to Synchronize Two Combo Boxes on a Form
http://support.microsoft.com/?id=209595

How to Create Synchronized Combo Boxes
http://support.microsoft.com/?id=209576

For your second question, my recommendation is to display the results of a search in a sub-form.
This way, the user can get a quick indication of the success of their query without having to
open a separate form. You can then use code to allow the user to open any record selected in the
subform by double-clicking on it. I have a sample that I would be happy to send to you, if you
send me a personal e-mail request with a valid return address. My e-mail address is pretty easy
to figure out. Whatever you do, please do not post your real e-mail address to the newsgroup.

Tom
___________________________________________


Hi...
I've set up a dialog box/query/form for our database that will allow you to
select criteria from two combo boxes that runs a query that runs a query that
then shows those records in a form. The two fields are Carriers and Acct#.
It works if you select one or the other or both. Right now it works fine,
but I have two things I want to do. First, how can I set it up so that if
someone selects a Carrier that the account numbers associated with that
Carrier are the only ones in the combo list. Second, if there are no records
found with their criteria, I want a message that comes up saying 'no records
found' and then hitting OK closes the form. Right now the form just comes up
empty.

Thanks for any help. Please let me know if you need more info.
Jenny
 
Hi Tom,

Thanks soooo much for these links...they really helped! I'd love to get
that code from you...I sent an e-mail to the address on your profile, but I
think I've missed something.

Thanks,
Jenny
 
AOS168 AT @comcast DOT net

Hi Jenny,

Remove the " AT " (space AT space).
Replace the " DOT " (space DOT space) with a single period (.)

The resulting e-mail address should be one "word" (ie. no spaces), and it should have 18
characters total, including the @ and . characters. Once you send me a message, I will reply with
my real e-mail address. The "AOS168" username is a temporary throw-away account, left over from
the recent past, when I used to teach a course by the same designation at a community college in
my area.

The automated spam harvesting software that spammers (the scum of the Earth) use is what keeps me
from posting the real e-mail address. I already receive a few offers each week for "mort gage"
loans, prescriptions of all types and offers for products to enlarge a particular body part, etc.
If I posted the address with no corrections required, I'd start receiving hundreds more. Note:
Intentionally misspelled words like mortgage are the spammers attempt to get around spam
filtering software that looks for various keywords.

Tom
_____________________________________________

Hi Tom,

Thanks soooo much for these links...they really helped! I'd love to get
that code from you...I sent an e-mail to the address on your profile, but I
think I've missed something.

Thanks,
Jenny
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top