473,406 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Cannot Save textbox Total into Table

134 100+
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
2 2318
PEB
1,418 Expert 1GB
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
jamesnkk
134 100+
PEB, I am just a beginner, would you mind explain a bit more on how to work around, thanks
Nov 28 '06 #3

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

Similar topics

2
by: Newbee Adam | last post by:
how to save textbox values to 2 tables using sqladapter I am new with this. Do I need to ADO.net? what is the simplist correct way? or can I write a query in my vb.net form insert table...
2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
2
by: crjunk | last post by:
I'm trying to write a piece of code that will programatically save a record automatically without me having to add a new ' Row.Item("ADD1") = txtAdd1.Text.Trim.ToUpper ' type command each time I...
6
by: kurt | last post by:
Hi all, I have something that has me stumped. I have a webform that has several text boxes. Each of these boxes has the textchanged set so when the user enters text and leaves the textbox, it...
2
by: toddw607 | last post by:
Hi all! I am attempting to bring an SQL Server table into ASP.NET using the datagrid . I have set all cells to be a text box by which the user can just click on and edit the cell. I have a...
0
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on...
2
by: KC-Mass | last post by:
I have a form that is used to ID and then load Excel files into Access. I use labels on the form to record which file was last loaded. That was accomplished with a simple lblFileLoaded =...
2
by: ashukite | last post by:
I have an invoice form bind to a bindingsource and bindingnavigator. I use the bindingnavigator to add and save records. But I can's save data from an item combobox and total text box. The item...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.