I have a new case tracking system. The cases table has these fields:
CaseID (Primary Key)
StatusID (looked up in another table - Open, Pending, or Closed)
Status Comment (memo field)
Date&Time (when casse was opened)
ProjectID (looked up in another table - various projects are listed there)
CustomerID (looked up in another table - list of names and other info for each)
Request (memo field)
Result (memo field)
TotalTime (decimal)
I then have another table that keeps track of the steps taken to resolve the cases:
StepTakenID (Primary Key)
CaseID (linked to Cases table)
StepDate&Time (when step was initiated moving forward with the case)
Step (memo field)
I then have another table that keeps track of the resources needed for each step:
ResourceUsedID (Primary Key)
StepTakenID (linked to StepsTaken table)
ResourceID (looked up in another table - list of names and other info for each)
TimeSpent (decimal)
Comments (memo)
====================
Okay, I can run a query that sums up the TimeSpent for all the resources used for all the steps taken for each case
SELECT tblCases.CaseID AS tblCases_CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID AS tblStepsTaken_StepTakenID, tblStepsTaken.CaseID AS tblStepsTaken_CaseID, tblResourcesUsed.StepTakenID AS tblResourcesUsed_StepTakenID, Sum(tblResourcesUsed.TimeSpent) AS SumOfTimeSpent
FROM (tblCases INNER JOIN tblStepsTaken ON tblCases.CaseID = tblStepsTaken.CaseID) INNER JOIN tblResourcesUsed ON tblStepsTaken.StepTakenID = tblResourcesUsed.StepTakenID
GROUP BY tblCases.CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID, tblStepsTaken.CaseID, tblResourcesUsed.StepTakenID;
Notice it Sums the TimeSpent fields for each case and give a SumOfTimeSpent...and that works.
====================
Okay, I have a form that displays information for each case (I can flip through the cases). I cannot seem to populate the TotalTimeSpent field on my form. I would also like to store this value in the TotalTime field in my Cases table (I know this is abnormal, but I still want to do that).
Thanks for any help!!!
chris.orear at ed.gov
3 1923
It's probable that your query is not editable. If you want to check then run the query outside of the form. If you cannot add a new record then the query is not editable. You will have to approach this differently if you need to edit the data.
I have a new case tracking system. The cases table has these fields:
CaseID (Primary Key)
StatusID (looked up in another table - Open, Pending, or Closed)
Status Comment (memo field)
Date&Time (when casse was opened)
ProjectID (looked up in another table - various projects are listed there)
CustomerID (looked up in another table - list of names and other info for each)
Request (memo field)
Result (memo field)
TotalTime (decimal)
I then have another table that keeps track of the steps taken to resolve the cases:
StepTakenID (Primary Key)
CaseID (linked to Cases table)
StepDate&Time (when step was initiated moving forward with the case)
Step (memo field)
I then have another table that keeps track of the resources needed for each step:
ResourceUsedID (Primary Key)
StepTakenID (linked to StepsTaken table)
ResourceID (looked up in another table - list of names and other info for each)
TimeSpent (decimal)
Comments (memo)
====================
Okay, I can run a query that sums up the TimeSpent for all the resources used for all the steps taken for each case
SELECT tblCases.CaseID AS tblCases_CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID AS tblStepsTaken_StepTakenID, tblStepsTaken.CaseID AS tblStepsTaken_CaseID, tblResourcesUsed.StepTakenID AS tblResourcesUsed_StepTakenID, Sum(tblResourcesUsed.TimeSpent) AS SumOfTimeSpent
FROM (tblCases INNER JOIN tblStepsTaken ON tblCases.CaseID = tblStepsTaken.CaseID) INNER JOIN tblResourcesUsed ON tblStepsTaken.StepTakenID = tblResourcesUsed.StepTakenID
GROUP BY tblCases.CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID, tblStepsTaken.CaseID, tblResourcesUsed.StepTakenID;
Notice it Sums the TimeSpent fields for each case and give a SumOfTimeSpent...and that works.
====================
Okay, I have a form that displays information for each case (I can flip through the cases). I cannot seem to populate the TotalTimeSpent field on my form. I would also like to store this value in the TotalTime field in my Cases table (I know this is abnormal, but I still want to do that).
Thanks for any help!!!
chris.orear at ed.gov
I ended up adding a button to my form to do the calculations when clicked.
1. create another query to SUM all the total times
2. create a form to use data from the new query and fill in the CASEID based on the alreay-open form
3. create a macro to open the form, use the SetValue to sync up the main form with the tomtal time on the new form, and close the new form
==========
So, I have a query that sums up the resource times for each step
I then have another query that comes and sums those for each case.
I used the form wizard to tell it to use data from an existing form to fill in the CaseID.
PEB 1,418
Expert 1GB
Hi,
Your TotalTimeSpent maybe is a sum of some fields isn't it?
You can Show it using formula in it's control source
=[Field1]+[Field2]+[Field3]
And to save this value in the database
On Form Current Event choose Event procedure
and type:
Me[TotalTimeSpent]=me![Field1]+me![Field2]+Me![Field3]
:)
I have a new case tracking system. The cases table has these fields:
CaseID (Primary Key)
StatusID (looked up in another table - Open, Pending, or Closed)
Status Comment (memo field)
Date&Time (when casse was opened)
ProjectID (looked up in another table - various projects are listed there)
CustomerID (looked up in another table - list of names and other info for each)
Request (memo field)
Result (memo field)
TotalTime (decimal)
I then have another table that keeps track of the steps taken to resolve the cases:
StepTakenID (Primary Key)
CaseID (linked to Cases table)
StepDate&Time (when step was initiated moving forward with the case)
Step (memo field)
I then have another table that keeps track of the resources needed for each step:
ResourceUsedID (Primary Key)
StepTakenID (linked to StepsTaken table)
ResourceID (looked up in another table - list of names and other info for each)
TimeSpent (decimal)
Comments (memo)
====================
Okay, I can run a query that sums up the TimeSpent for all the resources used for all the steps taken for each case
SELECT tblCases.CaseID AS tblCases_CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID AS tblStepsTaken_StepTakenID, tblStepsTaken.CaseID AS tblStepsTaken_CaseID, tblResourcesUsed.StepTakenID AS tblResourcesUsed_StepTakenID, Sum(tblResourcesUsed.TimeSpent) AS SumOfTimeSpent
FROM (tblCases INNER JOIN tblStepsTaken ON tblCases.CaseID = tblStepsTaken.CaseID) INNER JOIN tblResourcesUsed ON tblStepsTaken.StepTakenID = tblResourcesUsed.StepTakenID
GROUP BY tblCases.CaseID, tblCases.TotalTime, tblStepsTaken.StepTakenID, tblStepsTaken.CaseID, tblResourcesUsed.StepTakenID;
Notice it Sums the TimeSpent fields for each case and give a SumOfTimeSpent...and that works.
====================
Okay, I have a form that displays information for each case (I can flip through the cases). I cannot seem to populate the TotalTimeSpent field on my form. I would also like to store this value in the TotalTime field in my Cases table (I know this is abnormal, but I still want to do that).
Thanks for any help!!!
chris.orear at ed.gov
Sign in to post your reply or Sign up for a free account.
Similar topics
by: SJH |
last post by:
I have been given an older database and asked to make upgrades and what not.
One interesting thing I have come across with the database is that it was at
one time set up so one of the tables would...
|
by: S. Graefner |
last post by:
Hello Folks, I'm a Relitive newbie to the blood sport of MS ACCESS. I
have designed and built a database with multiple, Related, tables. The
db works well, more by good luck then good planing I...
|
by: Tolu |
last post by:
Hello
I am trying to save information from one form to two tables. I have
a table for Student info and Transcript line. I have a form that list
all the classes (using text boxes) a student is...
|
by: RCS |
last post by:
I have an app that I have different "sections" that I want to switch back
and forth from, all while having the server maintain viewstate for each
page. In other words, when I am on Page1.aspx and...
|
by: Cary |
last post by:
This may reveal my poor programming skills, but here goes...
I'm building a pricing tool for my business. I'm nearing the end of the
project, and I've been asked to be able to save quotes in some...
|
by: fstenoughsnoopy |
last post by:
Ok the complete story. I have a Contact Table, Query and Form, that
are used to input
and store the contact info for customers. They have FirstName, LastName
and Address as the primary key...
|
by: southoz |
last post by:
Good ay all ,
I'm fairly new to access(a little over 5 weeks now). Since I'v started I have picked up a lot of useful information from forums such as this and in doing so will share that information...
|
by: Nathan Guill |
last post by:
I have an interface that works with an Access back-end. I would like to
store and/or load user defined query strings per each user (i.e. no user can
access another's queries). The idea I had was...
|
by: ll |
last post by:
I'm currently working with an ASP page that populates rows based on a
query for course data by using a DO WHILE NOT EOF loop.
An improvement I'm adding is a dropdown populated by query which shows...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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
|
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...
|
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...
|
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,...
|
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,...
|
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...
|
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...
| |