473,394 Members | 1,722 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,394 software developers and data experts.

Multi criteria query

I have a database where all Work order project must meet some requirements in order to be in compliance. I need to know out of the total number of projects that meet these requirements. First the status must be in COMP Or FCOMP. Second the labor hours > 0 third the must be with in a time range. the second part out of all those work orders i need to know what percentage of the work orders fall in between PMINS,pmor, PMPDM,pmreg,PMRT. that are not in compliance how many do not meet requirement 1, how many do not meet requirement 2, and how many do not meet requirement 3. There may be variations - for example, PROJECT A meets requirement 1 but not 2 & 3; PROJECT B meets requirement 1 & 3 but not 2, etc.

These counts need to be converted into percents based on the total number of PROJECT WORK ORDERS who are not in compliance.

How can I set this up in a query or report to show this information?

Your help is much appreciated. I know i can do it with SQL but I'm not that fluent with SQL. I know its a Distinct Select Count but i don't know how to do this in query designer.

ms-access
Attached Files
File Type: docx Understanding the Metrics Handout.docx (21.4 KB, 172 views)
File Type: xlsx Maximo Report.xlsx (952.5 KB, 278 views)
Sep 28 '18 #1

✓ answered by PhilOfWalton

I am still very far from clear what you want, so please answer the questions below.

1) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., and nothing to do with Excel?

2) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., but with the data initially extracted from your Excel file?

3) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., but with the data continually coming from your Excel file which is continually being updated and changed?

4) Are you just using Access to do calculations on your Excel file, in which case, where do you want to show the results. I am no expert in Excel, but I would be most surprised if you couldn't achieve your goal without using Access.

I have attached a very basic Db which may or may not give the correct results for the first calculation, and may or may not give you some ideas.

Please ignore the queries and look at the form.

Phil

11 4116
PhilOfWalton
1,430 Expert 1GB
Difficult to know where to start.

The topic is under "Desktop Software", you have attached an Excel file, and further on you mention MS Access.

I have a feeling that you are referring to Access, in which case where have you got to with your project?

If you are converting from Excel to Access, you will need to normalise your Database before you can begin to solve your problems.

There are many articles on the subject, but here is a simple starter.

Phil
Sep 28 '18 #2
i have converted the excel table into access and have union query two queries SELECT Count(*) AS LEW
FROM MaximoReportT
WHERE (((MaximoReportT.Status)="COMP") AND ((MaximoReportT.ActualLaborHours)>"00:00") AND ((MaximoReportT.ActualStartDate) Between [Enter the Start Date] And [Enter the End Date])) OR (((MaximoReportT.Status)="FCOMP"));

UNION SELECT Count(*) AS LEW
FROM MaximoReportT
WHERE ((WorkType) In ("PMINS","PMOR","PMPDM","PMREG","PMRT")) AND ((Status)<>"CAN") AND (TargetStartDate) Between [Enter the Start Date] And [Enter the End Date];
which gives me 133/608 but now i need to figure out how to get those two numbers into a percentage .
Sep 28 '18 #3
PhilOfWalton
1,430 Expert 1GB
I am still very far from clear what you want, so please answer the questions below.

1) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., and nothing to do with Excel?

2) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., but with the data initially extracted from your Excel file?

3) Are you trying to trying to create a normal Access database with data in your tables and forms with Text Boxes, Combo boxes etc., but with the data continually coming from your Excel file which is continually being updated and changed?

4) Are you just using Access to do calculations on your Excel file, in which case, where do you want to show the results. I am no expert in Excel, but I would be most surprised if you couldn't achieve your goal without using Access.

I have attached a very basic Db which may or may not give the correct results for the first calculation, and may or may not give you some ideas.

Please ignore the queries and look at the form.

Phil
Sep 29 '18 #4
Answers: 1. Yes, I am trying to create a normal database in ACCESS WITH TABLES FORMS AND REPORTS.
2. YES
3.
Oct 1 '18 #5
Phill i did not see you loaded database.
But here is what i have been working on I hope it gives you idea that I am trying to accomplished.
http://s000.tinyupload.com/?file_id=...78388848224494
Oct 1 '18 #6
PhilOfWalton
1,430 Expert 1GB
So I know what you want but to try to put it gently, there is a lot of work involved. I am more than happy to help, but if we try to do it on the Bytes Website, it is going to go on and on and on.

I am the world's worst typist, so my suggestion would be to use Skype. If you want to do that, please send me a private message, and we will get things going.

Don't worry about loosing your existing data, we can load that into tables. It's messy, but can be done.

Sorry I forgot to attach the Db, and notes on normalisation. Will try again.

Please spend some time reading about normalisation. For a database to work correctly, it is essential to have a correct table structure and relationship between the tables.

Phil
Attached Files
File Type: zip Jeannie.zip (390.3 KB, 61 views)
File Type: zip Normalise.zip (417.0 KB, 73 views)
Oct 1 '18 #7
i have a hard time getting on skype since im not aloud to skype at work
Oct 1 '18 #8
PhilOfWalton
1,430 Expert 1GB
Well without being able to talk & share screens, it is going to take a long long time to sort out.

Do you have any similar alternatives?

Phil
Oct 1 '18 #9
i agree and see you point let me see if i can get permission from ny boss.
Oct 1 '18 #10
where do i send skype request do you have time tomorrow afternoon.
Oct 3 '18 #11
PhilOfWalton
1,430 Expert 1GB
Please see the Private Message

Phil
Oct 3 '18 #12

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

Similar topics

5
by: Steve | last post by:
I'm trying to do a multi table query that displays all the info I need in one array, and I'm having problems figuring out how to do it. The two tables are product and vendor. A vendor can be a...
10
by: molen malat | last post by:
i have a query with 4 fields, and a form based on it. i put another 4 textbox to get criteria to filter the query. the query runs normally when all the textbox have a value (not null) but when one or...
5
by: ladybug via AccessMonster.com | last post by:
I am trying to create a report using multiple tables. The first table has Employee info in it (name and id's). the next three tables have employee info for training, test, scores, etc. I am...
3
by: IAuditor | last post by:
Access 2003, XP - I have a multi-table query that is losing data. 1 table is a lookup (Hierarchy), and the other 3 are virtual duplicates (all with a one-to-many relationship with the lookup) except...
11
by: woodey2002 | last post by:
This problem is driving me crazy. Hello there, i am trying to create a search form for records in my access database. The search form will contain text boxes and a multi select list box. The user...
2
by: Deb Auer | last post by:
Access 2003 using dlookup to make a button visible. FYI MSPContactUserID(same as Environ("username")) table t41ContactMSP looks like this MSPContactID(PK) MSPTitleID MSPContactUserID 1 ...
2
by: Knowlton | last post by:
I have a query for the rowsource of a combo that returns null even though there are matching records. I assign this query in the AfterUpdate event of another control(SeedBrand). During debugging the...
2
by: MyDanes | last post by:
update PHYS_COUNT_TAG set COUNT_QTY= (SELECT qty from MC_PART_LOCATION where MC_PART_LOCATION.part_id = PHYS_COUNT_TAG.PART_ID and MC_PART_LOCATION.location_id = PHYS_COUNT_TAG.LOCATION_ID) THE...
3
by: saralouna | last post by:
hey i need ur help please it's my first time working with vba and access and i want to program an access form for multi search i have the type of contract as a combo box if i select type of contrat...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
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
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,...
0
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...
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...

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.