473,385 Members | 2,014 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,385 software developers and data experts.

Copying data from one control to another using button

2
Hi there

I have two text boxes on a form - "autosum" and "total". The "autosum" control displays a calculation executed by the underlying query. I am wanting to either enter this value into the "total" control via a button, or manually enter a value into the "total" control. I have read somewhere that you cant override a control when the value is the result of a calculation. Please note that I am very new to access so please be explicit with any code that I need to use.

As an aside - I tried to do this another way - I tried to set the "default value" property of the "total" control by entering:

=[autosum]

but this didnt work either, it resulted in a null value.

Many thanks in advance.


Symon
Aug 12 '10 #1
2 1170
Delerna
1,134 Expert 1GB
First off, why do you want to save a calculated field?

It is generally not good practice to save calculated fields. This doesn't mean you mustn't but you really should have a good reason to do it.

More questions,
Is [autosum] the name of the field or the textbox for the calculated field.
do you know how to write VBA code into control events?
Aug 12 '10 #2
Symon
2
Hi Delerna

Many thanks for your response.

The [autosum] control on the form is bound to a calculated field in the underlying query and not from the table - so the value isnt saved into a table. I simply want a means of overriding the calculated value to allow for flexibility - which is required for this particular application. The value that is entered into [total] will be saved however as this value may be manually entered. I thought that the easiest solution to this would be to place a button next to the [autosum] control which enters this value into the [total] control. The [total] control is bound to the same field in the originating table however - this is to allow for the possibility of a manually-entered value.

I am open to a better way to do this.

In the past I have dealt with code by finding the required code in other access db's then modifying it to work, or using the wizard where I can.

Thanks for your help - I hope all of this makes sense.


Symon
Aug 12 '10 #3

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

Similar topics

0
by: Randi | last post by:
Hi all, I have this project to use the ADODB control to acces and manipulate the Access DB. I amd the mistake of first doing this project with just the data control. It worked fine with this...
5
by: Thomas Lotze | last post by:
Hi, another question: What's the most efficient way of copying data between two file-like objects? f1.write(f2.read()) doesn't seem to me as efficient as it might be, as a string containing...
3
by: Tom Asken | last post by:
Short version: IE 6.0 wrongly posts <button ..> value. Internet Explorer should only post the value of the clicked submit button - but IE 6 posts the value of several submit buttons if they have...
4
by: bobdedogh | last post by:
can anyone add live hyperlinks to the sortable table made by the code supplied by Machi, or know of a simple alternative bob Machi wrote Mar 10 1999, 8:00 am >>>>>>>>>>>>>> .... Hello...
5
by: Vanessa | last post by:
I have a question, is that any other way to retrieve data from another webpage besides using XML object? Because I am using XML object now but give me so much problems. If I used...
7
by: Joe-Paul Robb, Jr. | last post by:
Hello: I am building a program in Visual Basic 6.0. (Op Sys: Windows XP 2002 Service Pack 2) I placed an AOD Data Control on a form...and a data Grid. I bound the data grid to the data...
4
by: Peter Afonin | last post by:
Hello, I have a form with several buttons, and I need to post this data to several different applications. In ASP.NET 1.1 it was quite easy - I just used HTML controls (text or hidden), then...
2
by: AlecL | last post by:
Hi All, I have added a user control onto an aspx page and want to make the submit button of that user control the default button when the panel in which the user control is located is visible. ...
2
parshupooja
by: parshupooja | last post by:
Hi, I have table which has 2 columns username password i want to insert username values from by copying data from another table whereas password shd be randomly generated Thank You
2
by: Hrvoje Vrbanc | last post by:
Hello all! As I have only recently started to use native ASP.NET 2.0 data access controls (and found them to be very powerful), I have one question that I was unable to find the answer to: -...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.