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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,186,156
Messages
5,956,254
Members
438,243
Latest member
FXA

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
Top