By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,929 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,929 IT Pros & Developers. It's quick & easy.

Cannot Save textbox Total into Table

100+
P: 134
I have a sub form that contain row of product item ordered, I created a textbox called txtamt in the subform to display the Total Amt -

In my control source, I wrote =Sum(nz([qty_requested],0)*(nz([quoted_price],0)))
It running ok, But I cannot store the txtamt value into the column of my main form table called invoice.


In my main form, the SubTotal property is
ControlSource=MCtmLineSubform.Form!txtamt

It only display the total amount but cannot save the value into the main form table-Invoice

Can anyone help ?
Nov 27 '06 #1
Share this Question
Share on Google+
2 Replies


PEB
Expert 100+
P: 1,418
PEB
I have a sub form that contain row of product item ordered, I created a textbox called txtamt in the subform to display the Total Amt -

In my control source, I wrote =Sum(nz([qty_requested],0)*(nz([quoted_price],0)))
It running ok, But I cannot store the txtamt value into the column of my main form table called invoice.


In my main form, the SubTotal property is
ControlSource=MCtmLineSubform.Form!txtamt

It only display the total amount but cannot save the value into the main form table-Invoice

Can anyone help ?
U should use an event in VBA to set this value to your table field! As control Source you need to enter your field from your table, but when an event appears this field should be also calculated and saved!

Try to calculate the amounts of your subform without expression but using VBA event in After Update..

It will update the row sum and calculate the big invoice total... I think there is the place for this!

:)
Nov 27 '06 #2

100+
P: 134
PEB, I am just a beginner, would you mind explain a bit more on how to work around, thanks
Nov 28 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.