View Full Version : Sync combo boxes - Null Value issue


kisskrisz
07-27-2009, 12:55 AM
Hi Everyone!
A very kind of you have solved my previous issue with my access database to synch 2 combo boxes.
The issue is that once I would like to save a new record and make the selection in CustomerID and ProductID fields based, I receive an error message that Index cannot contain Null value.

If there is no synchronization between the 2 fields, everything works fine.

I kindly ask for your help to solve this issue! I am absolute beginner in Access and also in programming.
Attached you can find the database in 2000 format. Combox boxes are in Service form.

Thanks again for your help!!!

John Big Booty
07-28-2009, 10:32 PM
I'm not sure how you've done this, but your Table Service has three Primary Keys :eek:, I suspect that if you remove two of those, things should work a whole lot better.

Also you have a table and a form called Service. This will cause you no end of grief further down the track once you start writing code, as the code or even macro will not be able to tell if you are referring to the table or the form when you refer to the object called Service :confused:

I would seriously suggest you consider implementing a naming protocol before you proceed too much further. Something like; TBL_TableName, FRM_FormName, QRY_QueryName, RPT_ReportName will make life a whole lot easier down the track.

boblarson
07-29-2009, 08:12 AM
And not only should you only have the Autonumber as the PK, you need to bind the combos to your fields.

See attached revision of your sample.