Form/sub-form and query question

Boozer

Board Regular
Joined
May 20, 2002
Messages
52
First:
If I have form x which contains subform y and the subform contains texbox z, how do I point to that value from a module script. What I want to do is something like:
something in form(x).value = subform(y).textbox(z).value

Second:
I have a query which which sums the amount owed and amount paid of a table and groups by debtorID. What I want is the difference between the amount owed and the amount paid. Is it possible to get that from a single query?
ex.
Amount Owed Amount Paid
debtor1 $100 $5
debtor2 $1000 $1000
debtor1 $50 $0
debtor2 $10 $5

so the result of my query is:

Amount Owed Amount Paid
debtor1 $150 $5
debtor2 $1010 $1005

Data I want is Amount Owed - Amount Paid, like this:

Amount Owed
debtor1 $145
debtor2 $5

Thanks in advance for your help!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top