Need help creating subform

S

Sunny

Hi,

I have never used subform but I think I need to use it now. I need to match
transactions in different tables. We have payment information in one table
and we import payment details from other system but unfortunately we dont
hae link between these two tables and which we would have to establish
manually by looking on some papers.

We have two tables:
1. Payment:payId, PayDate, PayAmount
2. PayDetails:
ClientId,
CliPayDate - can be different from PayDate in Payment table
CliPayAmount - sum of one or more CliPayAmount is equal to Payamount in
Payment table
PayId - Not known at the time of import

What I need is, list all records from Payment and select all records from
paymentdetails. Let user select one record from Payment list and decide
which client payments details are matched with the selected payment. Once
total is tally update PayId in PayDetails from Payment.payId.

I created a list in main form, which displays all unmatched payment and
created subform which shows all unmatched payment details with checkbox. But
when I select checkbox for one payment detail record, it selects all
records. My subform is not link to main form and subform default view is
Continuous Form. I want to select each payment details to match selected
payment from payment list and same time i want to show Total amount of
CliPayAmount for selected payment details. Can anyone please how to fix the
problem or any better idea for the solution?

Thanks.
 
K

KARL DEWEY

when I select checkbox for one payment detail record, it selects all records.
The problem here seems like you did not bind the check box to a field in the
table.

I think the solution is to do a DSum of all checked records in PayDetails
withPayId null (i can not help with that) and display on main form. Create
an event on the check box to requery/refresh the DSum On Change.

When you have a match use a command button on main form to Set Value of
PayId in PayDetails from Payment.payId for all PayId in PayDetails that is
Null and has check box checked.
 

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