Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Combo Box returns Nulls Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Denise Porter - 17 May 2005 23:23 GMT
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
Jeff Boyce - 18 May 2005 00:18 GMT
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>

>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,
[quoted text clipped - 6 lines]
> Thanks,
> Denise
Denise Porter - 18 May 2005 01:08 GMT
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
Jeff Boyce - 18 May 2005 18:47 GMT
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>

>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.
[quoted text clipped - 6 lines]
> Thanks,
> Denise
Denise Porter - 18 May 2005 21:14 GMT
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
Jeff Boyce - 19 May 2005 00:16 GMT
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>

>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
[quoted text clipped - 19 lines]
> Thanks,
> Denise
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.