I am just learning Access and have been tasked with creating a database for system access. We need a report that shows what systems have been in a pending status for 0-30 days, 31-60 days, 61-90 days, and 91+ days. I am soooo close to getting this but I’m at a dead end. For the examples below I will just use NFC and eOPF as the systems (there are five systems in all).
So the report would read like this:
Pending Date...0-30...31-60...61-90...90+
NFC....................1.........4..........8........1
eOPF..................2.........5..........1........0
I have the table setup with a status field for each group (i.e. NFC Status = “Pending” or “Complete”)
I have another field that has a date submitted (i.e. NFC Submitted Date = “XX/XX/XXXX”)
This is what I have done. I am only sharing this to give an idea of the direction I was heading. If there is a better way please let me know.
I created two quires (NFC Requests & eOPF Requests)
The first row field in the query is the status (i.e. NFC Status) with Criteria =”Pending”
The second row is the 0-30 days with the field of NFC 0 - 30 Days: Sum((IIf([Systems Access - Table]![NFC Form Date Submitted]>Date()-31,1,0)))
The third row is NFC 31 - 60 Days: Sum((IIf([Systems Access - Table]![NFC Form Date Submitted]Date()-61,1,0)))
Etc, etc.
So I have two quires that give me that data I need and they work. Now, I need to figure out a way to combine the quires by changing the fields that calculate NFC and eOPF separately and calculate them together.
I tried to build a summary request report but it wants to push the totals for eOPF over and I can’t line them up.
It looks like this:
Pending Date...0-30...31-60...61-90...90+...0-30...31-60...61-90...90+
NFC....................1.........4...........8........1
eOPF..............................................................2.........5.........1.........0
I’m getting frustrated and could really use some help.
Justin
I think what you are looking for is a "crosstab" query google a nit and you'll find many good examples for ms access.
This is one that helped me alot.
http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=25
Related
I have a firestore database that looks like this
/entries/ ....
/users/{userid}...
a bunch of documents is being sent into ... of entries and userid contains on 8 docs of user profile information.
my problem is that the entries doc contains field hours and no relation to the user doc which contains the field weekly_capacity
I need to aggregate this the two fields hours/weekly capacity setting them to Full-time equivalency variable
But the Full-time equivalency needs to be accurate and this company FTE can change so it would need to calculate the FTE over various date even if the user changed their FTE status x number of times.
And the current app only fetched the entries when the user logins into the app, which can be whenever.
None of the API requests that I am using will give me a json that holds both weekly_capacity and hours on the same fetch. If every time a user logs into the app firestore calls the http to fetch all entries then how can I compare the hours field on the collection's entries to the weekly_capacity field
Just a little context: FTE = Full-time equivalency and is used to measure as a standard to see if an employee compares to there core commit hours they signed up for which is 40. SO if I agreed to work 40 and I work actually work 40 hours then I would be 1 whole FTE. If I worked 20 and I suppose to work 40 I am .5 FTE. The math is really simple it's just that in my situation the variable FTE can change any time and the app will allow the user to enter a range of dates fetching the total actual hours they worked and FTE letting them know how many hours they were supposed to work vs how many hours they actually worked. Since the variable changes, I need some way in firestore to track the change and aggregate correctly against the hours actually worked. To give an error example: let's say I changed my FTE from 1 to .7 on March 20th, I then want to generate a report of March 1 to March 30th stating my hours worked and FTE status meaning did I reach my goal. The kicker is that I can't fetch or merge the entries which hold the var hours and /users/ which hold the var weekly_capacity.
I don't even think a cloud function would solve the problem since entries are only fetched when the user logins in right?
I'm assuming the following for answering your question.
Requirement: To calculate FTE for a user when user's weekly_capacity is updated or user logs in.
Problems:
Some way in firestore to track the change.
Calculate FTE correctly according to the change.
Here's what I think will solve the problems.
Google Cloud Firestore supports listeners for the collections in which you store the data. So you can listen for any change in users collection and entries collection. This is how you can track the change.
To calculate FTE, when a change is made to weekly_capacity of user document or a new entry is made to entries collection you need to query both collections separately to get the records corresponding to the user affected. You can also use a collections-group query for this purpose but that depends on your database design.
Hope that helps.
I'm building a report for a client. The report is not very complicated, just shows a bunch of stuff requested by the clients. One of the things I'm stuck on is... I need to be able to search by Transaction that took place between today and 6 months back. So when user click on Transaction report, it only shows the last 6 months from today. Anyone have any idea? I'm trying to build a query with that criteria, but I have no idea how it should be.
Another part of the report lets the client choose dates for the report (FROM & TO) and that's not too bad because I'm passing these values to a blank form and then using them in the report. However, here I'm having a hard time figuring it out.
=DateAdd("m", -6, Date()) This fulfills the requirements in my application
I'm working on an app that is partly an employee time clock. It's not too complex but I want to make sure I head in the right direction the first time. I currently have this table structure:
id - int
employee_id - int (fk)
timestamp - mysql timestamp
event_code - int (1 for clock in, 0 for clock out)
I've got everything working where if their last event was a "clock in" they only see the "clock out" button and visa-versa.
My problem is that we will need to run a report that shows how many hours an employee has worked in a month and also total hours during the current fiscal year (Since June 1 of the current year).
Seems like I could store clock in and outs in the same record and maybe even calculate minutes worked between the two events and store that in a column called "worked". Then I would just need to get the sum of all that column for that employee to know how much time total.
Should I keep the structure I have, move to all on one row per pair of clock in and out events, or is there a better way that I'm totally missing?
I know human error is also a big issue for time clocks since people often forget to clock in or out and I'm not sure which structure can handle that easier.
Is MySQL Timestamp a good option or should I use UNIX Timestamp?
Thanks for any advise/direction.
Rich
I would go with two tables:
One table should be simple log of what events occurred, like your existing design.
The second table contains the calculated working hours. There are columns for the logged in and logged out times and perhaps also a third column with the time difference between them precalculated.
The point is that the calculation of how many hours an employee has worked is complicated, as you mention. Employees may complain that they worked longer hours than your program reports. In this case you want to have access to the original log of all events with no information loss so that you can see and debug exactly what happened. But this raw format is slow and difficult to work with in SQL so for reporting purposes you also want the second table so that you can quickly generate reports with weekly, monthly or yearly sums.
Is MySQL Timestamp a good option or should I use UNIX Timestamp?
Timestamp is good because there are lots of MySQL functions that work well with timestamp. You might also want to consider using datetime which is very similar to timestamp.
Related
Should I use field 'datetime' or 'timestamp'?
I'm currently in the process of creating an extensive Access report (~50 calculated fields) for a client and while I've gotten 99% of the report down, I'm having trouble handling the Sum and Count logic on the report.
In a nutshell, the report is intended to list the attendees at an event, tally up the number of attendees at each track/course, and also list any outstanding dues which will be paid at the door. In addition, and this is where I'm having trouble, the report also shows the revenue from each track/course along with a breakdown of the revenue from commuters vs. people staying overnight.
At the moment, all of the formulas follow fairly similar structures so despite having 50 fields, 99% of those are simply adjusting the fields to fit the relevant variables.
For the report now with revenue, my issue is that although I have the fee data specified in the data tables, Microsoft Access keeps zeroing out the calculations rather than displaying the total on the fly.
Here's two of the formals I'm using:
=((Count([W1]))*[Fee Charged W1])
=Sum([Room & Meals])
Earlier today I think I pinpointed the problem to the fact that Microsoft Access is showing the report essentially per individual rather than displaying one report for the entire dataset. I've confirmed this because I manually checked the data and noticed some fields had null values which explained the null tallies.
My question now is whether there is a way to assign a default value for variables in reports so that the report cancels out any invalid data in the database table? I imagine using VBA would help, but I have little experience in that realm.
Thanks very much in advance for any assistance
Just found the solution which was right under my nose the entire time. I just had to configure the fields to use a Running Sum (also called a Cumulative Total).
The answer came right from a page in the Microsoft Office Website: http://office.microsoft.com/en-us/access-help/summing-in-reports-HA001122444.aspx
I've got a list of clients who have certain tasks done on a weekly basis. Currently we use an excel spreadsheet that keeps track of this but I am in the works of automating it. In the process of moving this into our MS Access system, I have created a form that does this for a single day and can display a report that outputs in the manner I want the form to look but I cannot get the form to look like that so the user can see all the days of the week for all the clients at once. I suppose I could do this in a subform per client but it seems a bit messy...
The spreadsheet we currently use has Column headers that state the Date and the rows are sort of grouped up by client that are for the number of times the given action occured, the timestamp of when it happened and other various data that happened on that day.
For the life of me I cannot think of a way to view all the records for that given week, grouped in detail per client all at once on the form. I can think of some ways to do this through VBA with recordsets but would like to know is there is a simpler way to do this that is easier to maintain.
Is there a way to do this with the use of a query and a few small scale tricks that don't involve storing recordsets? Keep in mind that this is for Access 2000, I only wish we would upgrade to '03.
Why not use five subforms? One for today, another for tomorrow, etc for
the next five business days. – Tony Toews Sep 12 at 20:57
That is the answer I've gone with and it works BEAUTIFULLY with the setup we are using. Thanks for the wonderful idea!