I have a form for entering event information with a subform for information on the client that is booking the event. The record source for the event form is an event table and the record source for the client form is a client table.
I created the subform as it's own form initially and as it's own form I can create new entries as normal. In the event information table I can associate the two forms using the Client_ID field. However, when creating an entirely new entry using the event form and I start filling out the client subform with a new client there is no autonumber generated in the Client_ID field. Then, once I leave the subform and move back to the main form I get the message: "Index or Primary Key cannot contain a Null value".
What is going on? How can I create a new event in the main form, enter a new client in the subform, and create a relationship between the two all in one system with out having to open up the client form first, open the event form, then open up the event table to create the link?
Also, suddenly the Client_ID autonumber in the client information table went from 9 to 129670. Any idea why? (I know, this last point may be for a different forum, but the whole situation is one confusing bundle for me.)
I created the subform as it's own form initially and as it's own form I can create new entries as normal. In the event information table I can associate the two forms using the Client_ID field. However, when creating an entirely new entry using the event form and I start filling out the client subform with a new client there is no autonumber generated in the Client_ID field. Then, once I leave the subform and move back to the main form I get the message: "Index or Primary Key cannot contain a Null value".
What is going on? How can I create a new event in the main form, enter a new client in the subform, and create a relationship between the two all in one system with out having to open up the client form first, open the event form, then open up the event table to create the link?
Also, suddenly the Client_ID autonumber in the client information table went from 9 to 129670. Any idea why? (I know, this last point may be for a different forum, but the whole situation is one confusing bundle for me.)