I have used autonumbers in most of my tables as primary keys. I have a form that has four text boxes and three subforms on it. The first text box holds the primary key and is not visible to the user. The other three text boxes have defaults in them (the user can change if needed). My problem:
If the user uses the mouse to click on a subform expecting to accept all of the defaults they get an error message stating that the primary key cannot be null. This is because the autonumber as well as all of the defaults aren't saved to the tables unless one of the fields is typed in or one of the fields is tabbed out of or "entered" using the enter key! Help!
Is there a way to get these fields to save by clicking on one of the subforms? I tried DoCmd.Save in several different places (Event code for leaving fields, AfterUpdate, BeforeUpdate, OnFocus, LostFocus . . . you name it)!!
Thanks up front for any responses!!
If the user uses the mouse to click on a subform expecting to accept all of the defaults they get an error message stating that the primary key cannot be null. This is because the autonumber as well as all of the defaults aren't saved to the tables unless one of the fields is typed in or one of the fields is tabbed out of or "entered" using the enter key! Help!
Is there a way to get these fields to save by clicking on one of the subforms? I tried DoCmd.Save in several different places (Event code for leaving fields, AfterUpdate, BeforeUpdate, OnFocus, LostFocus . . . you name it)!!
Thanks up front for any responses!!