R
RobertPlant via AccessMonster.com
Hi Experts/Enthusiasts,
Could you please help me on this problem regarding INSERT query, we have had
two tables
Say for example, Payment Table and AccountsReceivable Table both they have PK.
Now, if payment is made is Payment Table, then it mus be insert into
AccountsReceivable Table thus creating a scenario like this:
Let say, FIRST PAYMENT
CilentCode: XXX09-12
PaymentRefNo: 1122
PaidDate: 12-Apr-2009
PaidAmount: 10,000
CilentCode InvNo InvDate PayRef PaidDate Debit
Credit Balance
XXX09-12 009-001 01-Mar-2009 10,000
0.00 10,000
XXX09-12 1122 12-Apr-2009
10,000 0.00
XXX09-12 009-002 05-Mar-2009 15,000
0.00 15,000
XXX09-12 009-003 07-Mar-2009 10,000
0.00 25,000
The mystery is, our access always insert the new record in last row of the
recordsets,
I just want to insert payment details in AccountsReceivable subform, BUT IT
MUST LOOK FIRST THE INVOICES WHICH IS NOT PAID, like the example above. Is
there any chance we can do the same as well?
If SECOND PAYMENT IS MADE, THEN IT WILL LOOK LIKE THESE:
Then SECOND PAYMENT:
CilentCode: XXX09-12
PaymentRefNo: 1133
PaidDate: 15-Apr-2009
PaidAmount: 15,000
CilentCode InvNo InvDate PayRef PaidDate Debit
Credit Balance
XXX09-12 009-001 01-Mar-2009 10,000
0.00 10,000
XXX09-12 1122 12-Apr-2009
10,000 0.00
XXX09-12 009-002 05-Mar-2009 15,000
0.00 15,000
XXX09-12 1133 15-Apr-2009
15,000 0.00
XXX09-12 009-003 07-Mar-2009 10,000
0.00 10,000
I need your expertise regarding the above samples, please help me experts..
paging all the MVPS / Enthusiasts!
Could you please help me on this problem regarding INSERT query, we have had
two tables
Say for example, Payment Table and AccountsReceivable Table both they have PK.
Now, if payment is made is Payment Table, then it mus be insert into
AccountsReceivable Table thus creating a scenario like this:
Let say, FIRST PAYMENT
CilentCode: XXX09-12
PaymentRefNo: 1122
PaidDate: 12-Apr-2009
PaidAmount: 10,000
CilentCode InvNo InvDate PayRef PaidDate Debit
Credit Balance
XXX09-12 009-001 01-Mar-2009 10,000
0.00 10,000
XXX09-12 1122 12-Apr-2009
10,000 0.00
XXX09-12 009-002 05-Mar-2009 15,000
0.00 15,000
XXX09-12 009-003 07-Mar-2009 10,000
0.00 25,000
The mystery is, our access always insert the new record in last row of the
recordsets,
I just want to insert payment details in AccountsReceivable subform, BUT IT
MUST LOOK FIRST THE INVOICES WHICH IS NOT PAID, like the example above. Is
there any chance we can do the same as well?
If SECOND PAYMENT IS MADE, THEN IT WILL LOOK LIKE THESE:
Then SECOND PAYMENT:
CilentCode: XXX09-12
PaymentRefNo: 1133
PaidDate: 15-Apr-2009
PaidAmount: 15,000
CilentCode InvNo InvDate PayRef PaidDate Debit
Credit Balance
XXX09-12 009-001 01-Mar-2009 10,000
0.00 10,000
XXX09-12 1122 12-Apr-2009
10,000 0.00
XXX09-12 009-002 05-Mar-2009 15,000
0.00 15,000
XXX09-12 1133 15-Apr-2009
15,000 0.00
XXX09-12 009-003 07-Mar-2009 10,000
0.00 10,000
I need your expertise regarding the above samples, please help me experts..
paging all the MVPS / Enthusiasts!