Trying to understand subforms

hammerva

Registered User.
Local time
Today, 14:23
Joined
Dec 19, 2000
Messages
102
Hello all how are you doing. I am trying to create a screen that allows the user to add multiple records in a table at one time. I figure that using a subform in datasheet view will solve this problem (stop me if there are better ideas). I created the subform and linked it with the main form. Everything seems to be fine when there is data in the subform table. But I can't do anything if the subform table is empty. It would allow any updates but it keeps telling me my primary key fields are required. On the subform and forms I have "Allow Additions" marked Yes.

Does anyone know what I am doing wrong here.

Thanks
 
Why do you want to add multiple records at once?
 
To save them the trouble of going in and out of a form. The subform table only has 4 fields in it.

I think I figured out that problem anyway but still need some testing.
 
On closer reading of your initial topic (sorry), I think you need to make sure the PK fields are included in both the recordsource for the main form and the subform. They don't have to be on the form itself (though they can be, invisibly, so you can refer to them easily), but they should be in the query behind the form.

See if that helps.
David R
 

Users who are viewing this thread

Back
Top Bottom