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

RunningSum or Dsum???

So I am relatively new to Access so please bare with me...
I have been able to create a very functional form that will be utilized
for time entry for tasks.

The primary form is a record entry type that has a unique file number
for each entry.

At the bottom of the form I have a set of control buttons that when
clicked ,will open a subform for time entry. Each subform has a text
box that will take numeric values for hours and minutes. At close, the
values that the user enters for minutes and hours are put into the
table ,and the current date is added to the table that signifies the
recent entry date.

I would like to be able to allow the user to enter a new value in these
subforms upon re-opening, for hours and minutes, and thus 'adding' the
existing and the new value together to provide a new total in the
table.

This is what I would like to do:

Ex:

Data_Entry_Hours has a current value of 1 and current entry date

The table Data_Entry_Hours reflects 1

Subform is re-opened and a new value of 1 is put into the text box

Subform is closed and the table Data _Entry_Hours reflects 2,

and so on and so on.
At this point the text boxes are added to the form from the table so
they are merely an entry point. Do I have to have unbound text boxes
for the time values that will be added to the existing values in the
table ( on the fly calculations) or can I use a Dsum, Runningsum type
of expression.

I am confused as to the proper way to set this up.
This is actualy the last step in what has been a harrowing ordeal, and
any help is greatly appreciated.

Thanks in advance

EMC

Apr 25 '06 #1
2 2115
One way to accomplish this is to use an unbound textbox, let's call it
AddHrs. On your close button -OnClickEvent, you will add the value of
the AddHrs to the value of the Data_Entry_Hours:

Me.Data_Entry_Hours.value = Me.Data_Entry_Hours.value +
Me.AddHrs.value

I will let you take care of the housekeeping.

Happy coding!

Edgar J.

Apr 25 '06 #2
Baz
<em*****@msn.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
So I am relatively new to Access so please bare with me...
I have been able to create a very functional form that will be utilized
for time entry for tasks.

The primary form is a record entry type that has a unique file number
for each entry.

At the bottom of the form I have a set of control buttons that when
clicked ,will open a subform for time entry. Each subform has a text
box that will take numeric values for hours and minutes. At close, the
values that the user enters for minutes and hours are put into the
table ,and the current date is added to the table that signifies the
recent entry date.

I would like to be able to allow the user to enter a new value in these
subforms upon re-opening, for hours and minutes, and thus 'adding' the
existing and the new value together to provide a new total in the
table.

This is what I would like to do:

Ex:

Data_Entry_Hours has a current value of 1 and current entry date

The table Data_Entry_Hours reflects 1

Subform is re-opened and a new value of 1 is put into the text box

Subform is closed and the table Data _Entry_Hours reflects 2,

and so on and so on.
At this point the text boxes are added to the form from the table so
they are merely an entry point. Do I have to have unbound text boxes
for the time values that will be added to the existing values in the
table ( on the fly calculations) or can I use a Dsum, Runningsum type
of expression.

I am confused as to the proper way to set this up.
This is actualy the last step in what has been a harrowing ordeal, and
any help is greatly appreciated.

Thanks in advance

EMC


Sounds to me that you've gone slightly wrong with your basic design. I
think you need two tables, one for the unique file numbers (if that's what
you are calling them) and one for each entered time. It would look
something like this:

Table 1
=====
unique_file_number

Table 2
=====
unique_file_number
entered_date
hours
minutes
So, Table 2 would have a new record added to it for each new time entry.
You could display it by creating a form in continuous form view and
including it as a subform of the main form. To display a total, put a text
box in the form's footer, and give it a control source something like this
(untested!):

=Sum([hours]) + Cint(Sum([minutes])/60) & ":" & Sum([minutes]) Mod 60
Apr 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eric Schneider | last post by:
I'll preface this question with my assertion that I'm not intellectually challenged...(if you ask my wife on a good day she'll probably agree with you too) However, this problem is making me...
0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
2
by: Dalan | last post by:
I seemed to be having problems with structuring the use of NZ with a DSum expression. Having tried numerous variations of the expression without success, I'm asking for assistance. First some...
3
by: Mark Reed | last post by:
All, I have never used this function before and am not sure it what I need. Just to clarify, I have a report based on a query which has amoungst other field, wk, parea & packs_req. What I am...
2
by: Pea | last post by:
Hello, I have a report with groups, subgroups and counts. I'm trying to give a total for each group and used the RunningSum property by group. But I find that it's running throughout the report....
1
by: gbb0330 | last post by:
Hi All i am trying to calculate Quantity on hand in a unbound textbox in a form with a subform QonHand=Qreceived - TotalQSold TotalQsold=QsoldOnEbay+QsoldThruOtherChannels here is my...
2
by: unleaded14 | last post by:
Hi, Good day to all. I'm an newbie in visual basic. I just want to know what is the equivalent of MSAccess Report's(Textbox) RunningSum property to VB6's Datareport. You see I'm trying to...
33
by: potassium flower | last post by:
I am trying to create a food order system for a restaurant. I have tried using both the DSum and Sum functions to calculate the total cost of an order. The total cost is a textbox on the form...
1
by: danielgoss | last post by:
Hi I have a report that has loads of textboxes that calculate things based on the value on another textbox in the report. I have put a hidden textbox on my report that gets its value from an...
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: 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
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
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
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,...

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.