Use of List box and 'Index or primary key cannot contain null"

J

Julie

Hi,
I have put a list box on a form that is set up to allow for multiple
choices. It gets its info from a table with the command SELECT HSALast FROM
HSA;
All seems to work fine in terms of it allowing you to select none, one, or
more of the items in the drop down list. I do have a problem though. If there
was something selected for this field (one or more items, makes no
difference) if I save the info and then come back and blank it out, trying to
leave the field blank, when I try to move out of the record (forward or
backwards) I get the message 'Index or primary key cannot contain null".

I would appreciate any advice. Thanks, Julie
 
D

Douglas J. Steele

What version of Access?

If it's Access 2003 or earlier, you cannot bind a multi-select list box.
Multi-select list boxes always return Null, regardless of whether anything's
been selected in the list box.
 
J

Julie

Thanks for your reply Douglas. Sorry, should have said from the start that I
am using Access 2007.
 

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

Top