473,396 Members | 1,900 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,396 software developers and data experts.

command button to do action for all records

Hello everybody,

I have recently joined forum and this is my first post. I am trying to learn access. I could develope simple form with 3 text boxes and one command button on it. When command button is clicked, total of numbers in textbox1 and textbox2 is put in textbox3 for selected record. This works fine. What I want to achieve is that when this command button is clicked 'total' is put in textbox3 for all records in table linked to this form. I searched on internet, many articles but could not understand what to do. Can anybody help me?

Please help
May 1 '07 #1
5 1757
Rabbit
12,516 Expert Mod 8TB
seeing as how the third value is calculated from the first two values, there is no need to store it in the table. Doing so wastes space and introduces further complications. It's best to just recalculate the values when needed, such as through a query.

If you want the value on the form for the user to see, just set the control source of the third textbox to the addition of the other two. This way you'll get to see the total without having to store it in the table. Plus you get rid of the button as well.
May 1 '07 #2
Thank You for such quick help.

Why i want to save total in textbox3 is that I will then export this data to excel for further work. Actually I am trying to calculate 'Depreciation' for more than 10000 asset recordand if I put formula in excel worksheet directly, working of excel file becomes slow. Moreover data is already in access.

Any suggestions?
May 1 '07 #3
Rabbit
12,516 Expert Mod 8TB
You can make a query to calculate the third value and export the query instead.
May 1 '07 #4
Thanks a lot. 'Using Query' solved my problem to great extent.
May 2 '07 #5
Rabbit
12,516 Expert Mod 8TB
Good Luck.
May 2 '07 #6

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

Similar topics

2
by: mksql | last post by:
New to Tkinter. Initially, I had some code that was executing button commands at creation, rather than waiting for user action. Some research here gave me a solution, but I am not sure why the...
13
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
1
by: Tim | last post by:
I have one main form that I use to view data as well as add new records. When I click the add new record button, many of the form's controls that arn't needed get set to invisible. When I'm done...
2
by: Colin | last post by:
I have a main form with a command button on it that when clicked, opens a subform displaying records that relate to the main form. I would like to disable the command button if the corresponding...
2
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New...
14
by: Kevin | last post by:
A couple of easy questions here hopefully. I've been working on two different database projects which make use of multiple forms. 1. Where's the best/recommended placement for command buttons...
3
by: chris | last post by:
I have a form det-up as a continous form. In the Header of the form I have a command button called "Approve". What I'm looking to do is when the user clicks the command button all of the records...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
5
by: Susan Bricker | last post by:
I have a command button that I'd like to make "disappear" after being clicked and after the OnClick function has executed. I have tried changing the 'visible' attribute to false while within the...
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
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
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
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.