Queries :: Query Not Returning New Data

Jun 30, 2015

Any new data I add to my database isn't showing up when I run a query.I've noticed it on 2 queries. One which is my ChargerSearch query with the field name:

Code:
ChargerSearch: "Charger ID: "+[Charger_ID]+" "+"Scheme Contract: "+[Scheme_Contract]+" "+"Nissan Serial Number: "+[Post_Serial_Number]+" "+"Client: "+[Client]+" "+"Site: "+[Site]

and the Criteria:

Code:
Like "*" & [Enter Search Term] & "*"

And my JobHistory Query which has multiple fields from many tables. With criteria only on the Charger_ID field "[Enter Charger ID]". Both work fine for data that was already there but any new data I've added isn't returning any results when I enter the correct values in the parameters. The data is definitely there in the appropriate tables, it just won't find it on the queries.

View Replies


ADVERTISEMENT

Queries :: Query Not Returning Certain Data

Oct 17, 2014

I have 2 tables, one called Location and the other called PC Inventory. They both have columns called sites. The query is set to search both tables by site name and return the PC's at that site that match the search criteria.The search form has a drop down menu with all the site names. When you choose a site name from the last, the after update event does a re-query to a subform on that same form. The source object of the subform is set the query.[Forms]![PC Search]![Combo6] - this is the criteria on the query that point to the drop down menu.

Private Sub Combo6_After Update()
Me.Child19.Requery
End Sub

This is the requery that point to the subform (child19)..The problem is that some selections from the list don't return any results to the subform. But there is clearly records that meet the criteria in the table. Example: ABC @ Maryland returns all the PC's at the site. DEF @ Maryland doesn't return any PC's at the site, but there are records with that site name.Even if go into the table copy the site name that isn't working and enter into the search field it doesn't return the results.

View 3 Replies View Related

Queries :: Returning Averages For Quality Test Data

Aug 20, 2013

I am designing queries to return averages for quality test data.

I have this query that functions as I want it too [URL] .....

It returns the averages of all the values received for different tests for a lot number (the lot number criteria should be filled out as well)

When I want the query to be more specific and average only certain box numbers in the lot (that start with the prefix PB") the query does not return an average for box numbers starting with PB but splits them up, showing an average for PB1, PB2 instead of combining the data for those boxes into a single unified average ...

[URL] .....

View 3 Replies View Related

Queries :: Counting Records Returning Load Of Lines Of Repeated Data?

Oct 11, 2014

I have created a query that is designed to return a count of how many records there are in various tables. There are 10 expressions in all, so when it is run I am expecting to see one row of data with each field populated with the number of records.

It does do this, but the data is repeated over line after line (see the attached picture)

View 4 Replies View Related

Select Query Not Returning Any Data

Jan 13, 2006

I am trying to select all projects with the keyword "sett" in them. About a thousand rows with this keyword exist but why isn't my query returning any data? :confused:
Here's an example of the data "STPT-SETT-NY-EQ Legacy"

Now i want to return all rows with "SETT".
What am i doing wrong here please :)

SELECT projectList.*
FROM projectList
WHERE (((projectList.projectName) Like "%SETT%"));


this doesn't work either. No records are returned when query is run:

SELECT projectList.*
FROM projectList
WHERE (((projectList.projectName)="%SETT%"));

View 2 Replies View Related

Query Not Returning All Expected Data

Sep 7, 2007

O.k. I have a query working, and it's calculating perfectly and I'm reporting on it fine. However I noticed that when I run the query it doesn't populate the equation for all the results. Let me explain further.

I have a main form for tracking company information, and a sub form that tracks departments for that company and waste breakdown information. We take measurements for the company in two ways. 1 - a total weight for the day, and 2 - we weigh out categories of waste (within the sub form that tracks the department stuff)..we then calculate what percentage of the daily waste a specific category is. This calculation is done in a query, and works fine for the first department of every company, however when it moves to the next department for the same company, all I get is #Error in the field. eg./

Company "X"
Total Daily Weight = 750 Kilograms
Department "Shipping"
Category - Plastic Bottles - 20 Kilograms

I then have a query that calculates what % 20 Kilograms is of 750, then a report based on the query. This works fine; However in my report I look at the next department, with the exact same informaton as above...I see #Error returned in the field.:confused:

Does all of that make sense?? Is there a way to make sure my query calculation flows through all of the departments??

Thanks.

View 9 Replies View Related

Queries :: Max Query Returning More Info

Jun 16, 2015

I have two tables:

tblSITE and tblUSID (joined by SITEID)

and I am trying to create a query which lists each site and the USID with the latest date in its ConstructionDate field (USID and ConstructionDate are both in tblUSID). If I omit the USID from the query and run a totals with MAX on the ConstructionDate field, I return what I would like to, but I want to add the PK (USID) of the record with the latest ConstructionDate for another query, and every way I attempt it the query returns multiple records per SiteID.

View 3 Replies View Related

Queries :: Value In Query Returning As String And Not A Number

Apr 3, 2014

I have a query which runs fine, however one of the outputs is a calculated field and i use the Format(someValue,"Fixed") method of specifying the format for the % Change .Here is the query

Code:

SELECT tblTempBearsWeek3.SymbolCode AS [Short Ticker], tblTempBullsWeek3.SymbolCode AS [Long Ticker], tblTempBearsWeek3.[Week 3 Date], tblTempBearsWeek3.Short, tblTempBullsWeek3.Long, tblTempBearsWeek3.[Short Week 3 Close], tblTempBullsWeek3.[Long Week 3 Close],

[code]...

The problem is that the % Change calculated field for some reason comes out as a String. i know this because when I try and sort on that column, it sorts it as if it is text and not a number value i.e. it doesn't put it in Ascending order.

View 2 Replies View Related

Queries :: Append Query Returning Too Many Rows

Nov 14, 2013

I want an append query to create a new record in a table and populate that record with fields from a form. Some of these fields are free text, others are from combo boxes.The append query adds vastly too many records (albeit all populated with precisely the same information) - and the number it adds seems to depend on which combo box options I choose.

I have a similar append query which pulls information from earlier records in the table, and combines that with free text and combo boxes on a near-identical form, which works fine and always just adds one row.

View 10 Replies View Related

Queries :: Query Returning Blank Columns

Jun 24, 2013

I've set up a simple query that returns 6 columns of data.This query then shows on a sub-form elsewhere in my DB.The problem is that the query always appears with a horizontal slider. Allowing the user to scroll across to see the other columns in the query...The problem here is that there ARE no other columns of data. They are just empty. I want to restrict the output of this query to ONLY show the 6 columns that i have specified.

I have tried deleting the columns in Query Designer, then save the Query. But every time i re-open it half a dozen or so blank columns are stuck on the end.

View 4 Replies View Related

Queries :: Query Returning 2 Records When Only One Is Expected

Aug 7, 2015

I'm running a query from two related tables in the database.the table relationships and the query design. Instead of doing what I want it to do/what I think I'm asking it to - which is show the sum total number of weeks on the program for each student - it shows me the number of weeks for that student just for that claim, not the total for the student overall. I've added some 'dummy data' (2 records in the claim table relating to 1 student), and the query then returns the student twice in the results.

View 1 Replies View Related

Queries :: Query Returning Wrong Results?

May 7, 2014

I have two tables Contacts & Allowance. There is a relationship defined between the two based on Contact ID (primary field/contacts - foreign key/allowance). The Contacts table has Firstname + Surname. I have produced a query based on certain fields in both tables however the result is totally pulling incorrect info.

View 11 Replies View Related

Queries :: Correlated Query Returning Only 1 Record And Repeating

Aug 10, 2014

I have SQL query/dual sub-query in MS Access that is returning data from the left side of the query FROM correctly, but is only returning one record from the right side of the query FROM. Furthermore, it repeats the display of the one record and it repeats the entire results set with a different one record each time until all the records have been displayed. I expect that problems described as "Furthermore" will not exist by fixing the one record issue. I have tried using all the join types available in MS Access, but none change the result.

The desired output is:
Yellow Blue
11/23/2013 11/19/2013
11/19/2103 10/01/2012
10/01/2102 10/08/2010
10/08/2010 12/14/2007

The actual output is:
Yellow Blue
11/23/2013 11/19/2013
11/19/2103 11/19/2013
10/01/2102 11/19/2013
10/08/2010 11/19/2013
11/23/2013 10/01/2102
11/19/2103 10/01/2102
10/01/2102 10/01/2102
10/08/2010 10/01/2102

The same pattern is repeated 2 more times with Blue values of 10/08/2010 and then 12/14/2007.

Here is the SQL:

SELECT Long_List.Yellow,Short_List.Blue
FROM
(
SELECT DISTINCT BirthDate AS Blue
FROM (
SELECT DISTINCT BirthDate FROM citizens
UNION

[Code] ....

View 11 Replies View Related

Queries :: Nested IIF - Returning Calculated Results In A Query

Oct 30, 2013

What is the best approach to returning calculated results in a query. I have been using nested IIf statements that include DateAdd but I think that I am at a point where there must be a better way.

I want my query to calculate a date based on:
1) A Type field from my table
2) A calculated date based on other query fields.

My query has the following fields:
[Type] [Action 1] [Projected Action 1] [Projected Action 1 Revised] [Action 2]

I want to create a calculated field for [Projected Action 2] that says:

If [Type] is "A" then
if [Action 2] Is NotNull, Null
if [Action 1] is NotNull, [Action 1] + 10 workdays
if [Projected Action 1 Revised] is NotNull, [Projected Action 1 Revised] + 10 workdays
if [Projected Action 1] is NotNull, [Projected Action 1] + 10 workdays

[Code] ....

I would like to keep using nested IIf but I keep running into problems and I thought that there is probably a better way.

View 7 Replies View Related

Queries :: Select Query With Joins Returning Duplicates

Sep 18, 2014

I am building a select query which is grabbing data from multiple tables with items being linked by a unique field "Certificate_ID".

I have created joins between table A and Table B, and Table A and Table C, linking both by Certificate_ID

All have the join property set to select all Records from table A, but only those from Table B and Table C where the joined fields are equal.

Table A has 5000 records. Am I correct to assume that my query should only return a max of 5000 records as well? When I select Certificate_ID from A and another column from B it only gives me the 5000 unique records. When I add in a column from Table C it is however returning something like 7500 records, with several being duplicates with the same data in every column.

Why it is choosing to duplicate records and give me more than I want. I am sure I am overlooking something simple.

View 1 Replies View Related

Queries :: Prototype Database - Query Returning Results Twice

Dec 30, 2014

I am building a prototype database and currently has two records in it (I know for certain they are not duplicates). Attached is the relationship and below is the query. The query keeps returning the correct results but twice. (Duplicate results.)

SELECT DISTINCT WeekdayName([Weekdaynumber],False,1) AS Weekday, [Master Data].Date,
[Master Data].Machine, [Master Data].Shift, [Master Data Query].[Master Data_Product Code],
[Master Data Query].[Cases/Pallet], [Master Data].[Expected Pallets to Produce],
[Master Data].[Actual Pallets Produced], [Master Data].[Damage (Units)],

[Code] .....

View 6 Replies View Related

Queries :: DLookup And Variables - Query Returning Same Value For All Rows

Aug 8, 2013

I am having a problem with a Dlookup query. I want to achieve the following - I have 2 different tables

Demography Table - consisting of 2 fields, City and Region

For example
City Region
NYC NAM

The other Table totalflow consists of several field, one of the is flow from.

For example
Flow from
NYC
WAS
SEA

I want to do the following. Lookup the Flow from filed in table totalflow, and compare it to City in demography Table. If City = Flow from, return the value in Region. All are text fields.

I have tried following Query, but it only returns the same value for all rows. (from SQL view)

SELECT DLookUp("[Region]","Demography Table","[City] = '" &[Flow from]& "'") AS test
FROM [Demography Table], flowsize;

View 3 Replies View Related

Queries :: Nested Query - Left Outer Join Not Returning All Records

Oct 1, 2014

I have a simple nested query that is not working as expected. My inner query returns 102 records but when I run with outer query I only get 96 records. Below is my query, I don't really want to pull the same fields from both tables but I was doing to test. The values that are missing are those that don't exist with the monthenddate 8/31/2014 - a left join should fix that but doesn't seem to be working ..

Code:

Select distinct a.entity, a.gl_account,a.profit_center,[Open Items_1].profit_center,[Open Items_1].gl_account,[Open Items_1].entity
from(
SELECT DISTINCT [Open Items].entity, [Open Items].gl_account, [Open Items].profit_center
FROM [Open Items]
)a
left outer JOIN [Open Items] AS [Open Items_1] ON
(a.profit_center = [Open Items_1].profit_center) AND (a.gl_account = [Open Items_1].gl_account) AND (a.entity = [Open Items_1].entity)
Where ([Open Items_1].MonthEndDate=#8/31/2014#)

View 1 Replies View Related

Queries :: Parameter Query Returning Incorrect Results Based On Checkbox

Jul 31, 2013

I have a parameter query that contains information on a list of people and contains 3 checkboxes: alumni, parent, business

In this query, I am trying to use parameters to filter the results based on these three fields i.e.

true, false, true would return all records where either alumni, business or both are true, and parent can be either true or false.

false, true, false would return all records where only parent is true, and the other fields do not matter.

View 2 Replies View Related

Queries :: Returning A Particular Row?

May 21, 2013

I have a query that gives me the top 10 values. I would like to be able to use another query that says "only give me the second row or third row or what ever....So say I have column named ColorCode. For example...in this column it has the following:

ColorCode
1
3
2
2

I would like to be able to say give me "row 3 of the ColorCode column" and it would return "2"

View 4 Replies View Related

Returning Data To Populate A Report

Jan 17, 2006

Ive been pondering on this problem for far to long now so decided it was time to ask here !

I would like to return (based on a query) some records that would populate a report. I can set the source of the report as the query but my issue is that I need to actually have some code prior to report population.

EG if they have two products I want to list them product1/ product2 and as far as I know this isnt possible when you just set the source for the report...

The data is coming from SQL server so I have the option of a stored procedure but from trsting that seems to make things even more confusing.

Any help appreciated as Ive been stuck on this for far too long !!

Phil

View 2 Replies View Related

Qry To Group & Sum All Data But Only Returning The Location Of Where Max Pts Was

Jan 21, 2007

I have 1 table with multi Text columns (location, coaches,ssn etc), and
multiple Num columns (pts and product counts)

I need to sum all the unit counts & points for each person, but only
bring back the location for each person that had the 'max' sales (pts).

ex. ssn xxxxxx has 3 sales codes : code 1&2 had less sales aquired
then sales code 3. Sales code 1 was location Vt, slsCd 2 was location
CA and slscd 3 was location FL. I need to bring back the sum of all
three codes but only the location FL as it had the most sales pointing
to it.
I have deadline of Monday to get this done.PLEASE help

View 2 Replies View Related

Returning Data For A Set 13 Period Sequence

Jul 2, 2005

Hi guys
Well Im stuck!

I have to produce a report (preview first)that acts like a cross tab query. By this is mean that it reports specific data in a 12 period sequence for each year. Therefore I have to set up dates which are NOT normal calendar dates ie one could be 02/05/05 to 29/05/05 then the next would be 30/06/05 to 24/07/05

These dates are issues at the start of a contract year. I have to therefore produce the report for each period that is given to me ( not an easy one is it) I have considered many options but I cant quite get the final effect

Any Ideas ??

gareth

View 4 Replies View Related

Queries :: Returning Multiple Records

Feb 17, 2015

I have a sub report that is based on a query. The Where clause of my SQL is giving me a bit of hang up. What I am attempting to do is return the records that are the items used to test products we test. The ID's of the records are gathered in a public function. The function is called GetCal Equipment. This returns all of the requested numbers just fine. For example ID numbers 4, 112, 124, 138, 232, 338 are returned when I call the function. Any number of records can be returned at any point. This is the unique numbers used to identify the records. I thought by having the function return the numbers the records would come up. However when I use that in my where statement, none of the records are returned. The whole SQL is as follows:

Code:
SELECT CalibratedEquipmentListTable.ID, CalibratedEquipmentListTable.Manufacturer, CalibratedEquipmentListTable.ModelNo, CalibratedEquipmentListTable.Description, CalibratedEquipmentListTable.SerNo, CalibratedEquipmentListTable.LastCal, CalibratedEquipmentListTable.CalDue
FROM CalibratedEquipmentListTable
WHERE CalibratedEquipmentListTable.ID In (GetCalEquipment());

how to get the query for the report to return the records.

View 10 Replies View Related

Queries :: IN Statement Not Returning Records?

Mar 10, 2015

I have a query that I set up to return multiple records. The number of the records is in that text box. I have tried to set the where clause to the text box but for some reason I don't get any of the records I want returned. I am using a Where... IN statement. I have tried to put the numbers in single quotes and no quotes and I have had no luck at all. If I do individual records they will return, just not when I try and do more then one at a time. This query is a part of something more, but since it doesn't return anything, Here is my sql statement

Code:
SELECT CalibratedEquipmentListTable.ID, CalibratedEquipmentListTable.Manufacturer, CalibratedEquipmentListTable.ModelNo, CalibratedEquipmentListTable.Description, CalibratedEquipmentListTable.SerNo, CalibratedEquipmentListTable.LastCal, CalibratedEquipmentListTable.CalDue
FROM CalibratedEquipmentListTable
WHERE CalibratedEquipmentListTable.ID In ([Forms]![ReportForm]![Text41]);

View 6 Replies View Related

Queries :: Returning A Blank Or Null Value

Jun 18, 2015

In a query, how do I return a blank or null.

IIf([Field1]=[Field2],NULL,[Field3]

They are all numerical values that I need to format into percentages however Field3 could contain zero so I can't replace Null with zero. I simply want to return nothing if Field1 is equal to Field2.

View 3 Replies View Related







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