Combo Box returns Nulls Error

  • Thread starter Denise Porter via AccessMonster.com
  • Start date
D

Denise Porter via AccessMonster.com

I have a combo box on my main for to pick clients and bring up all the
records for that client. Some of the client names are in the combo box,
but do NOT have associated records yet. I'm getting a invalid "NULL" error.

Does anyone have code to prevent this NULL error is no records exist for
the drop-down??

Thanks,
Denise
 
J

Jeff Boyce

Denise

You have a list of customers with records, but some customers don't have
records? How 'bout if your list only lists customers who DO have records?

Good luck

Jeff Boyce
<Access MVP>
 
D

Denise Porter via AccessMonster.com

I have a Master List of vendors. The list is also used on the data entry
screen so you can add a new vendor record from the drop-down list.

I'm only getting the error on the preview and edit screens.

Is there any code to bring up a blank record, if there are no records for
that vendor or something like that??

Thanks,
Denise
 
J

Jeff Boyce

Denise

I can't tell, from what you've described, why you'd want a blank record.
Even though you use a "master list of vendors" in one place, there's no
requirement that you use that same list everywhere.

Jeff Boyce
<Access MVP>
 
D

Denise Porter via AccessMonster.com

I thought about that. But if I use a short list for the modify screen, then
in the data entry screen a User may add a record for a new vendor. Then to
modify that record later, it would not be a part of the short list. I
would need a way to build that short list up everytime a new vendor record
is added and add a new master vendor id each time.

I was thinking that if from the drop-down a User picked a vendor and there
were no current records for that vendor, I could just code a pop-up or
something that would let the User know that there were "no records for this
vendor" instead of bringing in a blank form or getting the null error.

The full list needs to be there because the User are looking for their
particular vendor, and it's better just to alert them that there are no
records. Later 1-2 could be added and if not "null" the records would
appear.

I'm still researching the site for this same issue somewhere....

If you know of another way, please advise.....
Thanks,
Denise
 
J

Jeff Boyce

Denise

You and I don't have the same definition of a combo box. When I create a
combo box, I use a query against a table (I used to use value lists, but
they are a pain to maintain). So if the new entry is added to the table,
the query "finds" it immediately!

Or am I misunderstanding?

Good luck

Jeff Boyce
<Access MVP>
 

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

Similar Threads


Top