Microsoft Access Subform Question

R

Robert

Group,

I have a Ms Access 2000 database with four tables, One primary (NAMES),
sub tables are PAYMENT, REFERRED AND PURCHASE. I want to reference the
Totals field from the table PAYMENT in the unbound text box called
txTotalPayment. This is in a form called CUSTOMERS with a subform called
PAYMENT. What formula (if thats the correct name for it) do I use to
reference this data?

http://www.webguytx.info/access/relationship.png (shows table relationship)

Robert
 
M

Mark A. Sam

Hello Robert,

If the name of the subform control is [Payments] then for the ControlSource
of [txTotalPayment] enter:

=[Payments].Form![Totals]

(I am assuming the Textbox you want to address is called [Totals])

God Bless,

Mark A. Sam
 
R

Robert

Mark said:
Hello Robert,

If the name of the subform control is [Payments] then for the ControlSource
of [txTotalPayment] enter:

=[Payments].Form![Totals]

(I am assuming the Textbox you want to address is called [Totals])

God Bless,

Mark A. Sam


Robert said:
Group,

I have a Ms Access 2000 database with four tables, One primary (NAMES),
sub tables are PAYMENT, REFERRED AND PURCHASE. I want to reference the
Totals field from the table PAYMENT in the unbound text box called
txTotalPayment. This is in a form called CUSTOMERS with a subform called
PAYMENT. What formula (if thats the correct name for it) do I use to
reference this data?

http://www.webguytx.info/access/relationship.png (shows table
relationship)

Robert

Group,

This worked great. I used =[subPayment].Form![AMOUNT]

Now I need to sum this field, I tried this
=Sum([subPayment].Form![AMOUNT]) I get a error with this statement.
What do I need?

Robert
 
M

Mark A. Sam

Group,

This worked great. I used =[subPayment].Form![AMOUNT]

Now I need to sum this field, I tried this
=Sum([subPayment].Form![AMOUNT]) I get a error with this statement. What
do I need?

Robert

Put a new control on the subform like [TotAmount] with the controlsourse
=Sum([Amount])

Then use the expression =[subPayment].Form![TotAMOUNT] on the main form
textbox.

God Bless,

Mark A. Sam
 
R

Robert

Mark said:
Group,

This worked great. I used =[subPayment].Form![AMOUNT]

Now I need to sum this field, I tried this
=Sum([subPayment].Form![AMOUNT]) I get a error with this statement. What
do I need?

Robert

Put a new control on the subform like [TotAmount] with the controlsourse
=Sum([Amount])

Then use the expression =[subPayment].Form![TotAMOUNT] on the main form
textbox.

God Bless,

Mark A. Sam
I worked it out. I used a unbound text box, turned visable to no it
still shows in the subform. How do I not show it?

Robert
 

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