Query Is Excluding Needed Information

Mar 1, 2007

I have created a query showing locations of a company's facilities, and product groups associated with that facility. Unfortunately the the products groups are located in one column and, if the facility produces more than one product, the product group is divided by a |, as shown below:
CABLE TRAY SECTION [05CT]|STEEL CONDUIT AND ELECTRICAL METALLIC TUBING SECTION [05RN]
In my query, I only want to show the product code, which I resolved by creating another table and associating the code with the product group. However, this query will exclude those plants that produce multiple products. How can I show just the product codes for all the facilities, including those with multiple product groups?

In otherwords, I would like the above example to look like this: 05CT|05RN (or something similar to this).

View Replies


ADVERTISEMENT

Information Needed Please

Nov 26, 2007

Hi to everyone Could anyone please tell me if there is a developer for access so I can get them to finish my database.

A friend started a data base for me but he had a motorcycle acident and the worst happed I have tryed to finish it myself but I'm not very clued up.

I would like to get a quote to finish I have just gone self employed and need this to produce surveys for Asbestos.

Im sorry if i'm not aloud to post this here if not please remove.

I live in soton uk I can put the database up on my server for people to download.

Thanks again


Please can anyone help here

View 3 Replies View Related

Some General Information Needed Please

Jul 2, 2007

Hi I am in the process of designing a new database using Access 2003 for my company. I have very little knowledge of access and what knowledge I do have is self taught!

The database is to hold medical records about patients that we see (we run a small medical centre)

The information that we put on it will include the patients personal details (name address etc..) and also details about treatments given to them.

Could anyone give me some advice on what type of database sounds best for this type of information. At the moment the database will only be used in the medical centre but will be accessed by more than one person at a time (not sure if that is relevant !

I really would appriciate some advice as some of you guys have helped me before and i value your opinions.

Many thanks in advance

Paul :)

View 11 Replies View Related

Excluding Data From A Query

Jul 30, 2006

Could someone please help me? I am trying to run a query in which I would like to exclude a particular person's name from the query. For example, I am entering productivity information for each employee and manager each day, however, I only want the employee information to appear in the reports each day. Is there anyway of excluding a name from a query?

Thanks:)

View 2 Replies View Related

Excluding Boolean Values From A Query

Mar 26, 2006

I have designed an invoice for a project that shows the amount of money needed to be paid, some of this has already been paid and some hasnt, how am i able to make it so that the values that have been paid and therefore have been checked are not include in the query. please help.

View 1 Replies View Related

Excluding Duplicates In One Field In A Query

Aug 9, 2006

How can I run a query on the table attached to show the number of UR's that were operated on. As you can see some of the UR have more than two procedure dates so I want to exclude duplicates. i have tried "count" but that just gives a "1" value for each UR on each procedure date

View 1 Replies View Related

Random Query Excluding Selected Group

Sep 24, 2005

I have a table with RandomID, EmpID, CompanyID. Some Companies will have great than 25 employees. I need to setup a query where I can randomly select all employees from all companies whos employee count is less than 25.
I have tried the following:
SELECT top 10 percent Count(*), empID
FROM tlbCompany
Group By empID
HAVING Count(*)<25
ORDER BY rnd(RandomID);

This counts the total number of employees, so if a company has 10 employees, it will only display one of the them.
Can this query be done?
And, what am I doing wrong?

Thanks to all that help....
Enviva..

View 5 Replies View Related

Forms :: Query Excluding Specific Records?

Jan 16, 2015

Trying to build a CRM system for the office but am getting stuck with the below...

Each company (tblCompany) in the database has at least 1 enquiry (tblEnquiries) linked to it and normally at least 1 (sometimes 0) people (tblPeople).

I have a form which loads company specific information e.g. notes/quotes/orders/people/enquiries. All data is loaded based on the company unique id (c_id).

The attached image shows Company 1 (c_id = 1). It has 6 enquiries. However the subform only displays 5 of these. It does not display any which do not have a person (or p_id) linked to it - this is consistent throughout the database. I have included the table relationships and the enquiry as well in case they are needed!

Searching the net seems to suggest 2 possibilities:

1 - the relationship join type needs to be set to include all from tblEnquiries and only those from tblPeople where joined fields are equal, however changing the join properties does not appear to have an effect.
2 - table field types do not match (all _ID fields are set to number, unique numbers only).

[edit]: am using Access 2010!

I have re-designed the query to pull through tblEnquiries and tblPeople data based on the c_id field on the open form, which is now showing all records, including those not assigned to a person.

However, in the form I can select one from the query datasheet and open to see additional info. Those without a blank p_id number do not open, I receive the error:

"Run-time error '2113': The value you entered isn't valid for this field.

All _id fields are set to numeric so am not sure how to correct this?

View 2 Replies View Related

Excluding Multiple Records From Query Based On Value In ONE Record

Sep 27, 2005

Table1 gives Case Nu.

Table2 gives Case Nu. and EventType.

Table3 gives EventType and Cleared (yes/no field)

I want to run a query that gives Case Nu and Event where if there is even one event marked Cleared for a Case, then that case number and its events (even those not marked cleared) don't show up at all.

Any ideas? I know there must be an obvious solution, but my mind is stuck right now!

View 2 Replies View Related

Queries :: Query Criteria Excluding Table Records

Jul 23, 2015

I want to run a query on a table that holds all speed information for our trucks imported from a third party. Some of the speed alerts in that table are not correct so we set up a second table managed by the users to enter a speed exception. So if we know that Main St in Dallas TX generates false alerts for speeding we know not to call the driver, the third party db speed limit is not up to date.

So I want my query to pull all the speed data from tblSpeedData, except leave out the records where the street and zip are listed in the tblSpeedExceptions.

View 3 Replies View Related

Get Date (minus One Day) Excluding Weekends And Holidays In SQL Query To Use In Access

Oct 11, 2012

I am trying to limit the results of a SQL query by date. I would like to take the current date from the system clock, move back one day, check to make sure it's not a weekend or holiday, then use the result date to limit the results in my Query. If the current date minus one day happens to land on a weekend, the date picked should be the Friday before the weekend. If the current date minus one day lands on a holiday, it should be the date before the holiday as long as it is not a Saturday or Sunday (on another holiday) .

Here is my SQL query right now.

SELECT DISTINCT (Mid(ClientDiv.Client_Division,1,3)) AS ABC, RTIClientTracker.EMB_OOB, RTIClientTracker.OOB_Fixed
FROM ClientDiv INNER JOIN RTIClientTracker ON ClientDiv.ID = RTIClientTracker.Client_Division
WHERE (((RTIClientTracker.Division_Region)='RTI') AND ((RTIClientTracker.Cut)>=Date()-1))
ORDER BY (Mid(ClientDiv.Client_Division,1,3));

It limits what it selects by using the current Date minus one day.

I need to skip over Saturdays, Sundays and Holidays.

View 8 Replies View Related

Help Needed With Query

Nov 19, 2006

Hi,

I was wondering if i could get some help here. I got problem while trying to perform sql query. I got an error message saying

"No value given for one or more required parameters".

I think i know what caused this but i just don't know how to get around this.

The query I'm trying to perform requires 3 tables and 2 queries.
Tables: Projects, Plan_Names, Reason
Queries: PSQuery, ProjectQuery

I think this is due to the fact that those two queries are empty for a start. Hence, it needs more value.

My question is how do i in the code, tell it to execute the two queries before attempting the query i want to perform.

Thank you in advance

View 7 Replies View Related

Query Help Needed

Aug 28, 2005

I have a query where I need to find out the average score of employees over a date range. I have a field called date where I enter a date range (Between [START DATE (MM/DD/YY):] And [END DATE (MM/DD/YY):]) and another field where I enter the name of the supervisor. Now the table I have created contains the scores on a daily basis. So what I want is that when I enter the date and the name of the supervisor it should give me the average of the scores over that date range of all the employees under that supervisor along with the name of the employee.

View 1 Replies View Related

Query Help Needed

Sep 6, 2006

I have two tables, a Property table and a System table. They are linked so that there are many Systems linked to one Property.

Each System has a risk score and these vary within each property. My Property table has a Property risk score field and in here i would like the maximum System risk score to go.

I'm just wondering how i would do this using a query? All the system risk scores have been entered already.

Any information would be great!!

Matt

View 4 Replies View Related

Query Help Needed Please

Jun 11, 2007

Hello everybody,

I am unsure whether this is best done in SQL or VBA, however, I do believe it is possible in SQL so I will put it here.

I have a field 'value of purchase' in which an items cost is inserted. What I am wanting to do initially is automatically deduct 20% off the value of purchase every year until it reaches zero. Now I don't want to deduct 20% off the new value every year, for example:

The price is $1000, 20% deduction is $800. But then year 2 it will be $600 then the next year $400 and so on. So I suppose the first year 20% is taken off the original price, then for year 2 40% and so on (always off the original price not the newly found values).

I want to display this in a new field 'current price'.

I am just not sure how to create the query so it will automatically deduct these amounts per year. If anybody has any advice/help it is muchly appreciated.

Thanks :)

View 2 Replies View Related

Query Help Needed,will Pay For Services.

Sep 7, 2005

I have a database that was designed for our needs (not by me) and I have limited database experience. I am looking for someone who can guide me through simple query modifications to existing queries for a flat fee. Please respond if interested and the amount charged for services.
Chris O'Reilly

View 1 Replies View Related

Help Needed With This Simple Query

Sep 12, 2005

I'm missing a bit of experience dealing with this query. It's very simple. I'm selecting log activities from COMLOG. However I only want the most recent DateStamp entry of each Cust_FK entry listed.

Because there are more logactivities, there are more/identical Cust_FK values. Would I first have to group these?? I just don't know how I would go about it.

SELECT COMLOG.LogID, COMLOG.DateStamp, COMLOG.Cust_FK, COMLOG.LogActivity
FROM COMLOG;

thanks

View 8 Replies View Related

Help Needed With Date Query!

Feb 27, 2006

Hi all,

I've searched the forums but can't seem to find anything similar. I work for social services and we have a database that stores information on children who may need services from adults when they reach 18.

What I need to do is create a query (so that a report can be run) that will show those children who will turn 18 during the year Apr 1st - Mar 31st but I'm not sure where to start. Can anyone offer any pointers please?

The fields within the database are:
Client ID, Name, Surname, Date of Birth, Address

Many thanks

View 3 Replies View Related

Query Assistance Needed Please.

Mar 9, 2006

I have DB with a Switchboard that has a button for Bin Number (Part Number). It is based on a parameter query that asks you to input your Bin Number. Once you enter the Bin Number it pulls all information for that Bin Number from a table that contains the Bin Number, description, Manufacturer P/N and Manufacturer and shows this in the query.

What I need to do is have this information each time a different Bin Number is entered to be stored in specific table (datasheet style) for printing out just a list of specific Bin Numbers and their information. As the parameter query stands now, each time I input a different Bin Number it clears the previous information. Can I tie in a make table query in some manner that will store the selected Bin Number info?

Can someone make suggestions on the easiest and quickest way to set this up? Keep in mind I am still learning Access so please be detailed in your comments. Thanks in advance for any assistance.

View 5 Replies View Related

Nested Query Help Needed

Apr 26, 2006

Hello everyone,

I’m looking for some help with a “nested query”

I have four fields that typically have a quantity amount in them.

I also have a field with a date.

I would like to say something like this

If fielda = 0 and fieldb = 0 and field = 0 and fieldd = 0 and in the date field, the date is >30day from today’s date add a 1 to this field, otherwise leave it blank


Thanks a lot

Corey

View 2 Replies View Related

Group By/Sum Query Help Needed!

Aug 16, 2006

Ok, here's what I've got.

I have an access database that links to some SQL Server tables. These tables hold time tickets which keep track of the time that an employee is logged into a job and records the associated product code and work code. All jobs have a work code, and some have a product code. The product coce is the most accurate way to track time, so if a product code is present I need to use that. If it's not present I use the work code.

I currently have a query called 'main' that gets all records in a specified date range and creates a 'code' column. This is a hybrid of the product code and work code using the method described above.

IIf([ProdCode],[ProdCode],[WorkCode])

Everything looks fine there, but when I go to a new query to get total hours by code ('TotalHoursPerCode') by grouping code and getting the sum of ManHour, it doesn't work.

Instead, it lumps all lines that have a product code together but then combines all lines that have no product code into a single line at the top. Instead of using the 'code' column to group.

Here's the SQL from the 'TotalHoursPerCode' query.

SELECT Main.Code, Sum(Main.ManHrs) AS SumOfManHrs
FROM Main
GROUP BY Main.Code;

Any ideas??

Thanks!


http://i45.photobucket.com/albums/f73/VolcomGrrrl79/access.jpg

View 7 Replies View Related

Simple Query Needed

Aug 22, 2006

Hi,

I have data that I imported into access (Table1). Basically, the file shows two values with Header, Component. I need to group the Component together with a delimiter & (or any symbol) when the header is the same.

For example of what I have:
Table1
Field 1 – Header
Field 2 - Component

FG1 | SA1
FG1 | SA2
FG1 | CO1
FG2 | SA3
FG2 | CO2

What I am trying to get is
Table2
Field 1 – Header
Field 2 - Join Component

FG1 | SA1&SA2&CO1
FG2 | SA3&CO2

Thanks
Andrew

View 2 Replies View Related

Help Needed To Build My Query!!!

Oct 26, 2006

Hi everybody,

Let's say that I've got the following tables:
- tblCustomers(IDCust,NameCust)
- tblEmployees(IDEmpl,NameEmpl)
- tblProjects(IDProj,IDCust,IDEmpl,Duration)

My query:
SELECT tblCustomers.NameCust, tblProjects.IDProj, tblProjects.Duration, tblEmployees.NameEmpl, Sum(tblProjects.Duration) AS SumOfDuration
FROM (tblProjects INNER JOIN tblEmployees ON tblProjects.IDEmpl = tblEmployees.IDEmpl) INNER JOIN tblCustomers ON tblProjects.IDCust = tblCustomers.IDCust
GROUP BY tblCustomers.NameCust, tblProjects.IDProj, tblProjects.Duration, tblEmployees.NameEmpl
ORDER BY tblCustomers.NameCust;

What I'd like get when running my query is:

NameCust ------ IDProj - Duration ----- NameEmpl ------- ?????????
CUST1 ---------- 1 ------ 3 ------------ EMPL3 ---------- 7
CUST1 ---------- 2 ----- 10 ------------ EMPL4 --------- 10
CUST1 ---------- 9 ------ 2 ------------ EMPL3 ---------- 7
CUST1 --------- 11 ------ 2 ------------ EMPL3 ---------- 7
CUST1 --------- 13 ------ 8 ------------ EMPL1 ---------- 9
CUST1 --------- 18 ------ 1 ------------ EMPL1 ---------- 9
CUST2 ---------- 3 ----- 20 ------------ EMPL1 --------- 20
CUST2 ---------- 4 ----- 12 ------------ EMPL3 --------- 17
CUST2 ---------- 5 ------ 3 ------------ EMPL2 ---------- 4
CUST2 --------- 10 ------ 5 ------------ EMPL3 --------- 17
CUST2 --------- 17 ------ 1 ------------ EMPL2 ---------- 4
CUST3 ---------- 6 ----- 25 ------------ EMPL4 --------- 27
CUST3 --------- 14 ------ 2 ------------ EMPL1 --------- 14
CUST3 --------- 15 ------ 2 ------------ EMPL4 --------- 27
CUST3 --------- 16 ----- 12 ------------ EMPL1 --------- 14
CUST3 --------- 19 ------ 2 ------------ EMPL2 ---------- 2

where ???????? (manually done) = the sum of the Employee duration for ONE Customer !!!

But what I get instead:

NameCust ------ IDProj - Duration ----- NameEmpl ------- SumOfDuration
CUST1 ---------- 1 ------ 3 ------------ EMPL3 ---------- 3
CUST1 ---------- 2 ----- 10 ------------ EMPL4 --------- 10
CUST1 ---------- 9 ------ 2 ------------ EMPL3 ---------- 2
CUST1 --------- 11 ------ 2 ------------ EMPL3 ---------- 2
CUST1 --------- 13 ------ 8 ------------ EMPL1 ---------- 8
CUST1 --------- 18 ------ 1 ------------ EMPL1 ---------- 1
CUST2 ---------- 3 ----- 20 ------------ EMPL1 --------- 20
CUST2 ---------- 4 ----- 12 ------------ EMPL3 --------- 12
CUST2 ---------- 5 ------ 3 ------------ EMPL2 ---------- 3
CUST2 --------- 10 ------ 5 ------------ EMPL3 ---------- 5
CUST2 --------- 17 ------ 1 ------------ EMPL2 ---------- 1
CUST3 ---------- 6 ----- 25 ------------ EMPL4 --------- 25
CUST3 --------- 14 ------ 2 ------------ EMPL1 ---------- 2
CUST3 --------- 15 ------ 2 ------------ EMPL4 ---------- 2
CUST3 --------- 16 ----- 12 ------------ EMPL1 --------- 12
CUST3 --------- 19 ------ 2 ------------ EMPL2 ---------- 2

Any suggestion to build this Query ??
Thanks in advance

View 3 Replies View Related

Help Needed On A Query Operation

Mar 27, 2007

I am asked to display this, "List the Client Numbers, Name, and Balance fields in the design grid. Sort the records in desending order by the Balance Field."
AND THIS: "Display the top 25%"

I need to know how to show the top "25%" when I press run, in the datasheet without manually having to arrange them.

I would love detailed instructions ASAP!

View 3 Replies View Related

Help Needed With Query And Form

Mar 29, 2007

Great forum guys! Just had to join it :)

I've been doing Access for just under 2 weeks now, so far I'm doing ok, but I've just run into 2 problems. I hope someone can help me on them.

The first problem is on a query. I have a Column called "Type" in my query and the choices under Type could be RECEIPT, REJECT, BOTH

(BTW: BOTH should show all records RECEIPT and REJECT)

By using case statements as shown below, i can easily return records for RECEIPT and REJECT, however, i cannot get BOTH to work

The criteria i have set for TYPE in my query is,

[forms]![frm_Vendor]![opta] OR [forms]![frm_Vendor]![opta] Is Null

Case 1
opta.Value = "RECEIPT"
stDocName = "rep_search"
DoCmd.OpenReport stDocName, acPreview

Case 2
opta.Value = "REJECT"
stDocName = "rep_search"
DoCmd.OpenReport stDocName, acPreview
Case 3
opta.Value = " "
stDocName = "rep_search"
DoCmd.OpenReport stDocName, acPreview


Case 3 does not work. with " " . So what do i do here to show Both records?

My second problem is with the reports opened with the above Case code. The search routine (apart from Both) work fine. It finds the records i ask of it and it opens a report to show them, however, there are instances where no records are found, and the report still opens!!. In my search form, what code can i use to test my query for "null" data before
it even gets a chance to open the report?

Thanks in advance for any help.

View 5 Replies View Related

Help Needed On Up-date Query!

Apr 11, 2007

i am trying to update a field within a table. But i dont want to update the whole of the data within the field just one part of it.

The field is the Tutor Group for students in the format 7B, 7D, 7F, 7H, 7M, 7S, 8B, 8D, 8F,... etc where the number represents the year group! i want to use an expression that would add(+) 1 to the year group but leave the letter the same as this doesn change. By doing this the above list would change to 8B, 8D, 8F, 8H, 8M, 8S, 9B, 9D, 9F, ...etc

I attempted to use the following expression: ((*)+1)(*) but it didn't work.

I should have had the year groups separate but i am given an Excel flat file which has details of the students and doesnt separate the the two.

any help would be much appreciated! hope someone can help!

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved