473,797 Members | 3,079 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running Sum In Continuous Form In Ms Access 2003

6 New Member
Creating a running sum in continuous form in Access 2003
--------------------------------------------------------------------------------

Hello:

I have three forms on my user-interface.

Main form is called frmPatients.
Within this main form is an embedded form called fromVisitDates.
Linked to this form is the form called fsubfrmServices .

The last form (fsubfrmService s) is of CONTINUOUS TYPE.

I know I can use DSUM to calculate a running sum on SINGLE FORM but this same function does not work in CONTINUOUS TYPE.

This is what I am trying to accomplish.

I have a textbox that is called curTotalBal.

I need to create a running sum of this value so that the balances show up in the footer of this form.

For instance, JON DOE pays a visit and he is given 3 services worth $15. He only paid $5. His balance for today is $10.

Same JON DOE pays a visit tomorrow and is given 2 more services and is charged $10. He only paid $5. His balance is $5 for today.

His overall balance is $15 ($5 from today and $10 from yesterday).

I need to add up all the balances from each visit so that the grandtotal of balances is easily visible on the footer of this form. This is for the convenience of the front desk clerk to inform JON DOE that he owes XYZ amount everytime he pays a visit.

This is what I have done so far.

I created an unbound textbox in the footer of fsubfrmServices and its control source is as follows:

=DSUM("[curTotalBal]", "tblService s", "[pKeyServicesID]<="&forms!frmPa tients!frmVisit Dates!form!fsub frmServic es!form!pkeySer vicesID)

When I run my form, I get #NAME? error.

Can anyone dissect this and help me out here???

Thanks in advance
Mike
Mar 16 '07 #1
6 7892
MMcCarthy
14,534 Recognized Expert Moderator MVP
Hi Mike

Firstly there is a syntax error in your code. Change as follows and see if it solves your problem.

Expand|Select|Wrap|Line Numbers
  1.  
  2. =DSUM("[curTotalBal]", "tblServices", "[pKeyServicesID]<=" &
  3. Forms!frmPatients!frmVisitDates.form!fsubfrmServices.form!pkeyServicesID)
  4.  
This will refer to the pkeyServicesID which is a control on the subform "fsubfrmService s" which is a subform on the "frmVisitDa tes" subform which is on the "frmPatient s" main form.

Mary
Mar 16 '07 #2
balancetotal
6 New Member
Hi Mike

Firstly there is a syntax error in your code. Change as follows and see if it solves your problem.

Expand|Select|Wrap|Line Numbers
  1.  
  2. =DSUM("[curTotalBal]", "tblServices", "[pKeyServicesID]<=" &
  3. Forms!frmPatients!frmVisitDates.form!fsubfrmServices.form!pkeyServicesID)
  4.  
This will refer to the pkeyServicesID which is a control on the subform "fsubfrmService s" which is a subform on the "frmVisitDa tes" subform which is on the "frmPatient s" main form.

Mary
Thank you Mary for your suggestion. I am sorry to inform you that it did not work. Do you have any other ideas?

Mike
Mar 19 '07 #3
MMcCarthy
14,534 Recognized Expert Moderator MVP
This will refer to the pkeyServicesID which is a control on the subform "fsubfrmService s" which is a subform on the "frmVisitDa tes" subform which is on the "frmPatient s" main form.
Is this structure correct?

What error are you getting or incorrect result?
Mar 20 '07 #4
balancetotal
6 New Member
Is this structure correct?

What error are you getting or incorrect result?
Yes the structure is correct. The error I am getting is #Name?

Will it help if I were to zip a copy of my db and attach it here???

Let me know.

Mike
Mar 20 '07 #5
MMcCarthy
14,534 Recognized Expert Moderator MVP
Yes the structure is correct. The error I am getting is #Name?

Will it help if I were to zip a copy of my db and attach it here???

Let me know.

Mike
Hi Mike

It will only work if the zipped file is under 40 kb.

Mary
Mar 20 '07 #6
balancetotal
6 New Member
Hi Mike

It will only work if the zipped file is under 40 kb.

Mary
Let me cut it down and then I will COMPACT&REPAIR the db before I zip it.
If it is less than 40Kb then only I will post it.

thanks for your patience.
Mike
Mar 21 '07 #7

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

Similar topics

11
10111
by: Randy Harris | last post by:
In a continuous form I would like to force a specific record to the top of the screen. I can use DoCmd.GotoRecord to go to the record that I want, but how can I adjust the display so that record appears at the top of the screen?
0
1513
by: peterleeds | last post by:
Could anyone explain why Access 2003 is continuously calculating a continuous form, when it works perfectly in previous versions? On reading previous messages I gather that overlapping controls cause this, but why? I use a hidden control underneath the whole line to highlight it when selected. If I cannot do this in Access 2003, how does one go about getting the
4
3176
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. Tables: (abbreviated) TblDivision DivisionID
11
3567
by: Doug Bell | last post by:
Hi, I am trying to create form that displays data like an Access continuous dataform rather than using a data grid. I am thinking that I can achieve this by creating a row of text boxes, one for each field I need to display. The creating a controls array for the first n records I show and populate the text boxes. Then setting up a vertical scroll bar for the number of records in the data table. As the scroll bar is clicked or dragged,...
1
10926
by: blueheelers | last post by:
I have been researching for several hours on the best way to display images in continous forms in Access 2003. For example, I want to display employee name, email, phone, and picture for each record in the recordset. I can have the pictures converted to any usable format, use OLE or linking, whatever needs to be done. So far, the 3 possible solutions I have found are: 1) OLE objects - if you don't have bitmaps associated just...
5
6033
by: kenethlevine | last post by:
Hello I am fairly new to Access and am having a problem for which I am trying everything without success. It is access 2003. I have a main form. When the user presses a button a modal popup comes up with a continuous form based on a database table. I am manually linking the table to the main form table rather than as a subform, but either way I get this problem. When the popup comes up, even though there are 3 records, I only see one. ...
13
3461
by: eighthman11 | last post by:
using Access 2003 and sql server version 8.0 Hey everyone. Created a text box where the user types in an Inventory number and it takes them to that inventory number on the contimuous form. The form is based on a link table to sql server. Here is the code: Dim rst As DAO.Recordset Dim InventoryItem As String InventoryItem = "'" & "TextBoxValue" & "'"
1
5350
by: MikiEns | last post by:
Hi all, Please excuse me if this is incorrect I am new to MS access and this Forum and appreciate any advice on posting. I would Like the Tab key on the key board to take the cursor down through a continuous form then across (am happy to do the across bit manually) and continue down the next field. I have looked all over the internet for answers but found only turning the "tab stop" to off. This only works when you only want to go down one...
1
3894
realayumi
by: realayumi | last post by:
ACCESS 2003 WIN XP Hi, i'm new in access, just a view days, this is my first post. Sorry for my bad English. I have 3 tables. tbl_product
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10468
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10245
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10205
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10021
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9063
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7559
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.