Queries :: Three Different Tables - Last Status Day Report
May 17, 2013
I have 3 different tables in a DB that I need to combine to get information on for 1 report.
table 1- Has the main info, (CR#) doc number, when issued, due date, etc...
table 2 - Is a Status table which in form view will show date and time of the status of a document and who has it.
table 3 - have what type of document it is and how many submitted.
The reports needed are: open status (what is the status of that doc. who has it and only need the last status) and the report needs to have on it: the cr #, what type of doc.
I have done a query combining the 3 tables and it is not showing correctly here? I just need the last date entered into status.
SELECT Max(tblsignatures.date) AS MaxOfdate, (([ReportDate]-[DateIssued]))-((DateDiff("ww",[DateIssued],[ReportDate]))) AS [Total Days], tblsignatures.status, tblitem.ReportDate, tblcr.CR, tblcr.DateIssued, tblcr.DueDate, tblcr.ClosedDate, tblitem.item, [DueDate]-Date() AS DueDates
FROM (tblsignatures INNER JOIN tblcr ON tblsignatures.cr = tblcr.CR) INNER JOIN tblitem ON tblcr.CR = tblitem.cr
GROUP BY tblsignatures.status, tblitem.ReportDate, tblcr.CR, tblcr.DateIssued, tblcr.DueDate, tblcr.ClosedDate, tblitem.item, [DueDate]-Date()
HAVING (((tblcr.ClosedDate) Is Null)
View Replies
ADVERTISEMENT
Nov 21, 2005
Dear All:
I have a list of names (First, Last) which is send to a printer in a report generated from Access.
Does anyone know how I can add a field in the report thats called "Status" where when all who are printed, under "Status" it says Done?
Thanking in advance,
Dion
View 2 Replies
View Related
Dec 9, 2012
I need to set up an attendance database, that has multiple statuses available for a single day.Example: employee can be present, he can have a sick leave, he can be away on training, or business trip, etc... And for some of those statuses, like business trip, i need to be able to freely enter a comment, stating where he is etc..
Anyway, the key is that this database should be able to offer a "headcount" option, and traceability for past statuses for at least a year, for every and all employees. Now i just need to set up the database tables and relationships.
View 6 Replies
View Related
Nov 20, 2014
I have some tables with data where in one column the user will choose a status between 30-40 different options. They are choosing this option to show a reason why a trade was pended and not approved immediately. These reasons seem to change frequently and sometimes we no longer want to use an old reason.
I do reporting back several years, so I cannot just 'remove' a reason or it will be removed from the table and I will have blank reasons. When selecting the specific reason, the table takes the dropdown from another table that simply lists every possible reason. I want to know how I can make it so that the reason that is no longer in use remains on that connected table, but when the person entering data clicks the dropdown button, the removed or inactive reason no longer shows up as an option.
Previously I had seen people add a column to the connected table of reasons and use a "yes/no" check box to show if the reason is now Inactive. When you checked YES on inactive, the reason would disappear from the dropdown list. My issue is that I do not know what language or formula to use (or where to use it) so that when I click Inactive = Yes, the reason disappears from the dropdown menu.
View 4 Replies
View Related
Jun 8, 2015
I want to run a query that returns a "small" or "medium" or "large" etc on each respective row against another columns respective numeric value...
< 500 = "small"
500 up to 1000 = "medium"
1001 up to 10000 = "large"
10001 up to 100000 = "very large".
View 8 Replies
View Related
Dec 22, 2014
I have a query with a record id, report date and status.
How do I pull the latest record if the status is AA?
For latest record in report date I used Max in Totals. With just this max it is pulling the latest date for each set of records with the same record id.
This is a start now how do i pull the latest record that has a AA status?
View 14 Replies
View Related
Jun 19, 2015
I have a database where there are 3 tables. table "d_cases", table "d_user" and table "d_status"
The table "d_cases" has the users and statuses only with a number. Peter has ID 2, John ID 1. There is status ID 1 that is New, ID 2 Started and so on.
How can I run a query that will show me the names and status instead of the numbers?
I have attached the database (2003 format) ....
View 2 Replies
View Related
Jan 25, 2015
I have a question regarding counting of text values base on their status and using that result to a calculation.
Say, I have a table of Demand of Positions, wherein, I have a specific Job Title for a certain Department that have number of workers needed (demand quantity) and a table of candidates for that job title and their status, say, Arrived, Visa Processing, Visa Applied, Visa Issued, and With Ticket.
What I would want is to make a summary out of the two tables, where the query will count how many candidates are there in that specific job title and have a field of status say, field of Count of Arrived, Count of Visa Processing and etc., and a field where I can add all of the count of candidates per status and deduct the result to the demand quantity where that field would be named Balance.
The problem is that the status varies on every candidate on that specific job title because the status field is used to track the progress of each candidate and this scenario will make the query blank because there would be no such record due to their status.
I tried making a summary following my requirement and you will see that in the attached file together with the SQL code of that query that the balance field value is blank.
View 2 Replies
View Related
Feb 10, 2014
I need to design a query that contains about a dozen fields for stationery items along with another dozen fields (checkboxes) to show whether these items were delivered (Yes, I know, not great db design).
I ran out of space with the the query criteria window.
View 6 Replies
View Related
Jul 31, 2013
I am looking to call two different queries from report wizard to produce report. Getting error message what to do in this situation as both queries are important as i have to pick all records from query A and just one record from query B any other option to get this in report.
View 4 Replies
View Related
Aug 2, 2013
I have started work on a database to track the many (several hundred per annum) projects my company undertakes. A 'main' table lists projects, their fees, their key dates, their project numbers, etc. I have created another table for tasks. Each task is assigned to a project (via the project number), and may be 'open' or 'closed'. I have separated the tasks table from the projects table as there may be several different tasks for each project. It is also good to keep a record of the tasks.
I want to prepare a report from the projects table that lists projects IF they have any open tasks.
In my mind, this means 'If a task, with the corresponding project number, is open, put a 'Yes' in the 'Tasks open' field of the Projects table.'
View 7 Replies
View Related
Sep 2, 2014
I have a three-column query that tells me how many hours I have available per week for a given resource type (e.g. welders). I have a second three-column query that tells me how many hours of work I have planned per week for a given resource type.I'm hoping to produce a query (the source for a report) that will show resource types in rows and twelve months in 24 columns. the first column for each month will show how many hours I have available for all my resources, the second column for each month will show how many hours I have allocated.
How do I produce a query that will combine the other two queries, inserting zeroes where necessary considering that for any given week I might have allocated work to a resource that isn't available (because the inconsiderate buggers think they are entitled to holiday) or I might have a resource that has no work allocated (because I'm incompetent)?
View 8 Replies
View Related
Oct 16, 2006
Would anybody know how to insert a status bar on a form and control it.Need help on this.Thanks in adv.
View 1 Replies
View Related
Aug 30, 2007
I've been avoiding this project but it has come up again. I have a file given to me each month. It contains a member number and status. The status could be any of the reason codes the user comes up with. So far there are ten. I imported the file into an access table. The users need a report summarizing the status changes if any. If there are any changes; the reason code will have a X under the reason code which pertains to them. I ran the unmatched query; but that gives me if the person was added or deleted. How do I search the reason code fields to check if there have been changes. If I ask for the nulls or is not null for each field; How would I know if it was null or not null in the beginning. I need a way to check to see if for example: Smith did not have a X under reason code 1 for the month of June but does in the month of July. I hope I didn't confuse anyone. Please help
Thanks
View 4 Replies
View Related
Mar 17, 2005
Does anyone know how turn the status bar off with code. I need to turn it off when the main form opens. Then when it closes I need it to come back on...
Thanks,
Ken
View 5 Replies
View Related
May 25, 2005
i am trying to make a cross tab query that will give me the status of the unavalble rooms in my hotel
somthing like that:
romm num today today+1 today+1 today+2 today+3 today+4 and so on...
1 X X
2 X X X
3 X X X
4 X X
5 X
thas how i will see where do i have a free rooms in a range of dates that i want to insert.
please advice,
Thanks
View 1 Replies
View Related
Apr 18, 2005
I have a database that has records at different statuses along the process, like "created", "submitted to finance", etc.
I have a form where I can choose the status from a dropdown and it will total the number of records at that status and display in an unbound field "Total".
My only problem is that when there are not any records at that status it will still display the previous statuses total. Am I missing something in my code?
Private Sub status_AfterUpdate()
If Not IsNull(Me![status]) Then
Call CalcTotal
Else
Me![Total] = 0
End If
End Sub
Private Sub CalcTotal()
On Error GoTo Err_CalcTotal
Dim db As Database
Dim rs As Recordset
Dim Q As QueryDef
DoCmd.Hourglass True
Set db = CurrentDb()
Set Q = db.QueryDefs("qry_total")
Q.Parameters("[status]") = Me![status]
Set rs = Q.OpenRecordset()
rs.MoveFirst
Me![Total] = rs![Status Total]
Exit_CalcTotal:
DoCmd.Hourglass False
Set rs = Nothing
Set db = Nothing
Exit Sub
Err_CalcTotal:
Resume Exit_CalcTotal
End Sub
Thank you ahead of time for your help!
Adam
View 8 Replies
View Related
Aug 12, 2005
Hello all,
I've already run searches on this but found nothing exactly matched.
Here is the situation that hopefully you guys, experts, can help.
I have several databases and on the main one (master one), I want to be able to show status of other databases, whether they are in use (meaning being open) or not. Is this possible?
They are all in the same drive.
Thank you all in advance. ;)
Access 2003
View 6 Replies
View Related
Dec 27, 2005
I have developed several applications in code which take anywhere from 15-30 minutes to run, depending on the amount of data and local server traffic. I would like my clients to be able to tell that their process is actually running through some kind of "percentage complete" status bar or progress indicator, rather than their computer sitting there with an hourglass visible for what seems like forever. I would like to set this up where it runs from the form which triggers the code or the like.....any easy way to set this up or any code repository make this easier?
Thanks. Happy new year to all!!
View 3 Replies
View Related
Nov 22, 2006
I have some code behind a button which take data from form and inserts in history table. while problem is that when ever i press the button the data goes to the table but the form went to first record. so how to stop the form on its current record
View 4 Replies
View Related
Sep 7, 2005
Hey guys, I am trying to creat a query from my Status table, but having NO luck getting it to work. Basicly the Query is going to create brand new columns with the Status entry from the row selected. I have been able to create a query with 1 status column, but I cann't seem to figure out how to code it where it creates a 2nd. Heres what I have
SELECT SiteStatus.Status AS MailStatus
FROM SiteStatus
WHERE (([SiteStatus].[Site Component]="mail"));
Some how I need the Where statement to go along with the new Mailstatus column and then create a new column with the same effect, have it select the status from the row what contains the "component" in the "component" col. Anyone get any of this cause its starting to confuse me even now. Using Access 2003
View 2 Replies
View Related
Feb 4, 2007
Hi there,
i am writing a query that calculates a date
ExpiryDate: DateAdd("yyyy",[NATATable].[NATAExpiryPeriod],[NATATable].[NATADate])
which works
The expiry period is always 2 or 4 and the natadate is a date i want it to add 2 or 4 years to the date the NATA was done... works no problems.
Now i want a query in another field as a status
ExpiryStatus: Expired or Valid
ExpiryStatus: IIf([ExpiryDate]>=Now(),"Expired", "Valid")
Which works
i am ultimatley aiming to end up with 3 Fields - Expiry date (working), Status (working) and Remark (not working)
Remark is based on this excel query
=IF(AL3<NOW(),(IF(AL3<(NOW()-365/4),"(3) Expired more than 3 months ago","(2) EXPIRED during last 3 months")),(IF(AL3<(NOW()+365/4),"(1) Expires within next 3 months","(4) Expires in more than 3 months time")))
which i need to change to an acess query.
Where AL3 is the expiry date.
Please help
Thanks
Kris
View 1 Replies
View Related
Apr 27, 2005
Ok, am stuck on this one.
I have a form with all the navigation keys and it also lists your own name which you logged in with. Value comes from a string called strUser.
Now i have made a query (based on tblUsers) that returns me the user that is logged in and his status and acces rights. Criteria comes from the label showing the username on the form. I managed to get the value of that checkbox set to true whenever he logs in through a query on the login screen.
Now, whenever the user quits the application i want the status changed. So that the checkbox is unchecked when the user quits. this way the administrator can see who is logged in and logged out. How do i get it to false when he logs out.
Thanks in advance
View 2 Replies
View Related
Jan 22, 2008
I have a databse that has 9 fields that are represented with Check Boxes.
When I display my form, I want the Check Boxes to be "Checked" if there is a "T"
in the field that it represents. If the Field has a "F" or blank, I want the check
box to appear unchecked. Then, the user will check boxes for each vialation the
homeowner has and place a "T" of the appropriate field. When the form is re-displayed
I want the check boxes to checked for each vialtion the homeowner has and unchecked
for vioaltions the homewoner does not have ("F" or blank)
There are 2 different databases. The Homeowners database contains general information
regarding the homeowners. The Violations database is a subset of the Homeowners DB
that is opened from a Mainmenu with a selection for Violations.
The Violations database is not linked to or connected to the Homeowners db in any way.
It is a distinct db with the following fields:
Property Number - index @
Complainer - name of complainer
Owner - owner of the property
Infraction - Specific data on the exact violation
Date Notified - When owner was notified
How Notified - How the owner was notified - phone, in person, by mail
Result - test describing the results of notification and correction
Notes - Miscellaneous notes on violation
Landscaping - check box - if checked - there is a landscaping violation - "T" in file
Architecture - check box - if checked - the is an architectural violation - "T" in file
Weeds - check Tbox - if checked - there is a weeds violation - "T" in file
6 more check boxes denoting violations.
when the violations form is first displayed, boxes should show a check mark when there
is a "T" in any of the 9 specific violation fields. If the specific violation fields have a "F"
or is blank, the box should not be checked.
If the owner has a new violation, the user will check the box and an "T" will be placed
in the appropriate violation field in the DB.
How do I or can I accomplish this in Access.
This is a converted Foxpro database and I do not wish to completely redesign and
re-write every form and file. I just want to make it look and act the same as it would
in Foxpro.
I am not an expert Access programmer but have written samll apps.
Thanks for any and all help.
View 12 Replies
View Related
Nov 24, 2014
I am working on a Student database for a school. Need changing the student status e.g. A student was enrolled in class Prep. and now promoted to grade 1. How do I solve the problem. I need this for a report (Student Details) Like on 1/1/2014 the student was enrolled in prep and on 1/1/2015 he/she was promoted to grade 1.
View 3 Replies
View Related
Sep 27, 2006
Hi folks,
This is my first posting to this forum and I hope someone will be able to help me out with this.
I have a table called FILETRANS in a DB.Essentially this table is to track the in-flow and out-flow of files in a documentation unit.
The schema of the table is as follows
Filetrans_id Pk int Auto
Files_id int
Filetransdate date
Filestatus_id int
A filestatus can either be 1(IN) or 2 (out)
I need a query that will give me a list of all files whose last recorded status is 2(out) and vice versa.
Any help will be greatly appreciated.
Regards
Charles
View 4 Replies
View Related