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 Replies


ADVERTISEMENT

Returning Select Records In Query

Mar 30, 2006

Hello, I am sure this is quite simple, however I cannot figure it out. I have a query that shows tblPartNumber and tblAverage. The average is calculated in the query by taking the total minutes to assemble the parts, divided by the number of parts completed. What I am trying to do is run a query that will show me the most efficient (lowest average), time for each Partnumber. Ideally the query would show me something like this;


Part # Average
1234 .72
1234 .86
1234 .94
etc...

I searched on here and it seemed like the Top 10 is used, but in my application that ommits all of the other partnumbers because it only shows ten of the records for the first partnumber. I only want to see the five most efficient averages. Any help is greatly appreciated.

Thanks, Tim

View 3 Replies View Related

Select Query Returning No Results?

Sep 12, 2012

I have a db with 2 tables, one containing basic info FirstName, Surname, YearGroup, and another table with other data. I imported a list of names into the first table, firstname and surname only were imported, other field was left empty, other table was also left empty. I made a simple select query to pull all records from both tables and i get no results at all. None of the imported names show on the query results. what I am missing?

View 2 Replies View Related

Modules & VBA :: Select Query Returning String Instead Of Value

May 2, 2014

Why is strCreditCheck returning the actual query string and not the result? Of course, this is not working.

Code:
Private Sub b_PrintWorkOrder_Click()
Me.Requery
Dim strCreditCheck As String
Dim strCompany_id As Integer
Dim stlinkCriteria As String

[code]....

View 6 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

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 :: 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 :: 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 11 Replies View Related

Select Not Returning Any Value

Nov 29, 2007

Hello!

My problem is the following:

My select works fine when I select 3 fields, but trying to select more than three, when I add two fields more, it doesn't give me the last two fields, being these two fields added lattely in the table...

I mean... I added two fields more to the table one it was created, and the script executed.
After that, if I try select * from table, the recordset does not have this two fields... only the old ones...

Any idea?

View 1 Replies View Related

Select Not Returning New Values

Nov 28, 2007

Hello!

I've good a very very strange problem...
I do an insert of a new row into the table TRA. That insert creates an id for the new row.
Right after that I do a select of the new row, trying to get the new id created.
Well, the insert is working fine, but the select sometimes gives me values, sometimes not.
How is it possible?? I've tryied closing the database and opening it again, but is not working anyway...

Any idea??

My code right now is the following: (closing the database, setting recordset to nothing... and still not working properly)


sql = "insert into tra (semana, empleadoid) values('" & semana & "'," & empleadoId & "); "
DoCmd.RunSQL (sql)
db.Close
Set db = OpenDatabase(database)
sql = ""
Set rcset = Nothing
sql = "select * from TRA where (semana='" & semana & "' and empleadoId =" & empleadoId & "; "

View 10 Replies View Related

Returning Multi Select Values

Sep 29, 2005

I have a problem that I haven't seen discussed here yet. (I know this is not good practice, but we're doing this for transfer to another application that wants and accepts data this way)

1) I have a multi select list box.
2) I have code that saves all the values in a semi colon delimeted list in a single field in the DB. (As I said, the application that this data is going to (and from) wants and accepts data in this way)

3) My problem is this. When I re-open my form, how do I get the values that are stored in the database to be highlighted in the multi select list box. I have code similar to this running, but still can't figure it out.

Dim lst() As String

rst.Open sSQL, cnn, adOpenStatic, adLockOptimistic
lst = Split(rst(0), vbCrLf, -1) 'Split the recordset into an array
For i = 0 To List96.ListCount
For j = 0 To UBound(lst) 'lopp until the upper bound of the array

'If the item in the list box = the item in the array then highlight the item in the list box
If List96.ItemData(i) = lst(j) Then
List96.ItemsSelected(i) = True
End If
Next j
Next i

In a nutshell, that's the problem. My list box contains a list of about 5 or 6 things, the user can select any number of them, and I store it in a single field in the DB semi colon delimited. However, I don't know how to return that field to my list box with the selected values highlighted. IE if the list contains A, B, C, D and the user selected A, C the field in the DB looks like this A;C. When I open the form again, I want to highlight A and C in my list box since those were the fields the user selected.

What happens is A;C gets passed to another application (which wants it that way). However, in that other application those values may or may not change, and then they will be passed back to me. (IE the other application may change those values to A;B;D and pass it back to me (which I accept no problem). However, when the user opens the form I want A B and D to be highlighted in the multi select list box

Any help is much appreciated

Robbo

View 4 Replies View Related

Queries :: SELECT TOP 3 Returning More Records

Mar 24, 2015

My statement below is current returning 4 records. Two of the records have the same GBPAmount value.

RequestID is the Primary Key

Code:
SELECT TOP 3 RequestID, GBPAmount, Currency, RequestDate
FROM PayRequest
WHERE (((Currency)="CAD Canadian Dollar") AND ((RequestDate)>#11/16/2014#))
ORDER BY GBPAmount;

Code:
RequestID GBPAmount Currency RequestDate
10207 8.17 CAD Canadian Dollar 03/02/2015
9874 33.82 CAD Canadian Dollar 20/01/2015
11327 109.58 CAD Canadian Dollar 23/02/2015
10495 109.58 CAD Canadian Dollar 05/02/2015

View 3 Replies View Related

Queries :: Query To Select All Data Regarding A Clicked Field

Mar 1, 2015

I have three tables. TableA contains certain order information, such as the username of the employee, type of order, alias number, etc. TableB contains phone numbers, username of the employee, etc. TableC contains supervisor names and alias numbers.I didn't make these tables but that's what I'm working with. I connected TableA to TableB with the username of the employee, and then TableA to TableC using the alias numbers.

I have a report that summarizes how many orders of each type there are. It shows the supervisor, employee username, alias numbers and then each type of order with the amount of orders of each type under the headers.My boss wants to be able to click on the amount of that type of order and have it show him the details for those orders. This is where my problem is.

I was able to use an Inner Join type of query that allows me to filter the data by order type (however, I have to make a new query for each order type since I'm not too experienced on this). The problem is that I cannot find a way to have a query filter the data by order type AND employee username, so that it only displays the orders taken by a certain employee and it only contains one order type at a time, depending on which order type you clicked.

View 14 Replies View Related

Forms :: Query Show A Combo Box To Select What Is Connected To Data

Dec 10, 2013

I'm trying to set a query with 6 fields.

My question is: Is it possible that the query shows me a combo box to select what is connected to this data.

Example fields:

HospCode; HospName; Dept; ModName; SerialN; DatInst

I'm looking to select name of a hospital from "HospName" from a list box. If no, then at least to write the name and the rest I'll get it associated with the name.

Then I need to know if I can put this in a form so the form asks same criteria?

View 1 Replies View Related

Modules & VBA :: Write Select Query That Will Search The Data From Bottom To Top Of Table

Dec 3, 2013

see below the code . The select statement searches the Printpoolno value from the top to bottom in table tblmaster. As in my table tblmaster there are thousands of records and it takes long to search for that Printpoolno from the table . Is there anyway we can write a query that will search the table from bottom to top as the Printpoolno will always be in the bottom records and not in the top records.

Code:

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim r As Long

[Code].....

View 3 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

Display Records Of Select Query After Selecting Desired Data From Single Combo Box

Nov 13, 2011

I created a subform that displays the records of a select query after selecting the desired data from a single combo box (for instructors name) and then using an OpenQuery macro attached to a button.

Only 1 record is displayed in the subform each time I hit the button. If I look at the query return there is no change. However, if I close the query and select a new instructors name, although I only get one record in the subform, the query when opened shows all the correct records.

What is wrong with my macro/subform?

View 8 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

Query Not Returning Results

Jun 23, 2005

Hi,

I have a query with two table's in them. One is filled, the other is still empty.
Both table's are related to each other with the field "document number".

This was working fine in access 2000, now in 2003 it returns zero results.
I am starting to think it is because one table is empty it returns nothing.
How can i adapt the query criteria or something else that it shows the results from table one, while table two can still be empty.
One table holds the documents and all information about it, the other holds the information wich document is referenced on wich document. Now since i can have documens which don't reference to a document, i still want those in the list.

Anybody any idea?

Thanks

View 1 Replies View Related

Query Not Returning All The Records I Need

Sep 28, 2005

I have 3 tables - Students, which contains all students; Attendance, which contains dates a particular student was absent; and AttendanceCtrl which contains Quarter beginning/ending dates. I need to be able to calculate the number of days a student was present, absent, tardy in a quarter. The query needs to extract all students regardless of whether or not they missed any days. I tried using a Left join Students to Attendance and then joining AttendanceCtrl but Access said it couldn't do it because of "ambiguous outer joins". It said to create the first join then use that query in the second join. I tried that. I created a query with a Left join joining Students to Attendance. That gives me what I wanted, all students from Students and also those students with matching records in Attendance.

The 2nd query is giving me problems. I tried joining the first query (qryStudents) to AttendanceCtrl and calculating my totals. Problem is, the query only gives me students what have records in the Attendance file; it doesn't give me all the students. If a student did not miss any days, I need to show that he was present 90 days out of 90. Because there's no matching record in the Attendance file, I get nothing for those students.

As I said the first query (qryStudents) seems to be working but I need to take the records from that query, group them together by StudentID, and then calculate my totals. How can I do this? Am I approaching this wrong altogether?

Thanks for any help.

View 1 Replies View Related

Returning All Values In A Query

Jan 21, 2006

Hi.
Can someone help me?
I am trying to make a query return all values (please see attached jpg)
It returns some of the values, but is not returning values that have nothing in the "material" field (Null Values?)
In this example, I would like it to return all values that fulfill the Completion_Date, CW_Department, Handed_Over and Chargable fields, whether they have any data in the Material field or not.

Do I need to use the NZ, IIF or IsNull function? I have seen this is previous threads, but nothing like this example.....I apologise if there is.

Many Thanks.

Frank.

View 2 Replies View Related

IIF Query Not Returning Result.

May 27, 2006

Hi,

Can anyone see anything wrong with this query?

I have 10 combo boxes where years are selected. If the last year nothing is selected (meaning is empty) then my query should return the last selected value. It seems the IIF query does not seem to work (Still showing empty). Can you please advise and help me on this?

The query I am using is shown below.

Thank you

dfuas


IIF([Trade].[Vintage_ to] = ' ',([Trade].[Vintage_from9]) OR ([Trade].[Vintage_from8]) OR ([Trade].[Vintage_from7]) OR ([Trade].[Vintage_from6]) OR ([Trade].[Vintage_from6]),[Trade].[Vintage_ to]) AS [Vintage to]

View 4 Replies View Related

Query Returning To To Much Information

Jun 21, 2006

Hi all
I have a query that is getting data fron 2 linked tables. The relationship between these 2 tables is 1 to many. The first table(One side) contains Due Dates for services. I have asked the query to return services for the current date which is working fine. The second table(Many side) has additional work required for each vehicle. The work can be either New, On Hold, In Progress or Completed. I only want work that has not been completed to be returned if the vehicle is due for a service today. I tried having the Work Status field in the query and criteria set to <> Completed. This returned all open work including vehicles not due for service. Is there anyway this can be achieved. If I take the criteria out of the Work Status field I get the information I am looking for but it includes Completed work and I do not need to know this.
Any and all advice appreciated.

Regards
Craig

View 2 Replies View Related







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