S
S
Dear All,
To enter the data relevant to a particular product in my database, I
have created a data entry form that is composed by two different
parts: a combo box where I have the "product name" and a subform
having "data sheet" format where I want to insert the data.
The subform is populated according to the values of two other tables
(XX and YY).
The value in the combo box is the primary key of one of the tables
feeding the subform.
When I try to enter the data for a new record I get this message:
"Index or primary key cannot contain a Null value"
which makes sense, since the combo box is independent from the sub
form.
To solve this problem I have to find a way to state that, if the user
enters data in the subform, the field "product name" of the table XX
is to be set as the form combo box value.
Is there anyone who faced this problem before and can maybe give me
help?
Thanks very much in advance,
David
To enter the data relevant to a particular product in my database, I
have created a data entry form that is composed by two different
parts: a combo box where I have the "product name" and a subform
having "data sheet" format where I want to insert the data.
The subform is populated according to the values of two other tables
(XX and YY).
The value in the combo box is the primary key of one of the tables
feeding the subform.
When I try to enter the data for a new record I get this message:
"Index or primary key cannot contain a Null value"
which makes sense, since the combo box is independent from the sub
form.
To solve this problem I have to find a way to state that, if the user
enters data in the subform, the field "product name" of the table XX
is to be set as the form combo box value.
Is there anyone who faced this problem before and can maybe give me
help?
Thanks very much in advance,
David