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

how to show results to an expression on a query or table

I need help!! I'm using Access 2003 and I'm a inexpreienced user. I have the expression (=[amount]-[payment]) set up in a form for balance. When I enter the data into the form the balance box displays the result. However when I open the table the amount is not displayed in the column for balance. This also happens when I run a query. How can I get the information to show up in the balance column in both the table and the query?
Oct 29 '10 #1
1 1927
gnawoncents
214 100+
Ashley,

When you set the control source to an equation, it is no longer linked directly to the table, so it won't update.

Something you could do is set the field to reflect exactly what is in the table and use a little VB to update.

For example, assuming the fields are [amount], [payment], and [balance] in both the table and form, you would do the following:

1. Set the control source of [balance] to "[balance]" (without the quotes)
2. Add an after update event to the [amount] and [payment] fields on the form that looks like this:
Expand|Select|Wrap|Line Numbers
  1. Me.balance = Nz([amount], 0) - Nz([payment], 0)
Let me know if that works for you.
Oct 29 '10 #2

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

Similar topics

1
by: lonelyplanet999 | last post by:
Hi, I'm studying perl programming now. Previously I encountered a script with 3 statements as below. # space between a +, - or " char b4 a keyword? remove it! $in{keywords}=~s/ \+ +/ \+/g;...
2
by: Stan | last post by:
Hello all, I'm looking for some hints as to how to use the results of a query in another query. I assume I'm 'thinking' wrong in how to solve this, so I'm hoping someone can clobber me and send...
11
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
6
by: dummie_q | last post by:
Hey, I am having some confusion about how to formulate this particular query. I have 2 tables. Table A has 4 columns say a1,a2,a3,a4 with the columns a1,a2,a4 forming the primary key. Table B...
18
by: Steve | last post by:
Hi I have a really weird problem and any assistance would be welcome. I have developed an app in Access 2002. The app runs perfectly on the development machine. I have packaged the app using...
4
by: Mark | last post by:
Hi all, I have a query which returns 56 results every time. 1 field of the query contains the results of an expression where 55 will contain decimal points and 1 will be a whole number. Is there a...
3
by: Mark Goldin | last post by:
I need to show results of transformation on the server. Thansformation returns an attribute based xml string. Can I bind DataRepeater to the xml string? Thanks
1
by: indhu | last post by:
Hi all i know it is simple but i don't know how to give + and - respectively to show and close the table. do i have to use sub form or what. pls help me
2
by: james121285 | last post by:
I am writing a program and I need the user to type in a set value and my program should calculate various answers, I have done the program for the calculations but I do not know how to print the...
5
by: sansann | last post by:
Hello there! i need help on loading data from my Access database query table name combine into my MSFlexgrid select by batchno category. when i runn below coding the error said "Selected collating...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.