subform and data entry

P

Pitlochry1

I have a main form that shows data from Payments Table and a subform that
shows all payments from the main form's DonorNo.
I have set the properties of the subform to allow editing, adding and
deleting, however after entering details in the subform the main form does
not find it.
Can anyone advise what needs to be done to sort this?
Thanks
 
K

karl dewey

Form/subform should be set up as parent/child using the Master/Child links to
synchronize them. The parent ID field value needs to be duplicated in the
child table. This is done by having parent ID as primary key field and set a
one-to-many relationship to the child table with referential integerity and
cascade update selected.
With the form at the parent of choice record any record added in the subform
automatically has the ID of the parent.
 
J

Jeanette Cunningham

Hi Pitlochry1,
you have a table for payments and a table for Donors?
One donor can make many or one payments - that makes the table and
relationships look like this
-->
tblDonors
DonorID -- Primary Key
DonorName
......

tblPayments
PaymentID -- Primary Key
DonorID -- Foreign Key
PaymentDate
Amount
.....

Assuming that the 2 tables above fit your database, you would build your
main form based on the Donors table and the subform based on the payments
table.
Your present setup sounds the reverse of this, and is most likely the reason
that it doesn't find the payment you enter in.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
P

Pitlochry1

Thank you so much Jeanette!

I have been so engrossed in it that I did not take time to step back from
"the trees" and put them together on a form.

Glenn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top