Queries :: Showing 0 If No Results?

Mar 5, 2015

I have a query that i can type in an item number and it Sums all the locations and tells me how many i have in the building. If i do not have any in the building then there is no record of it in the table and comes back blank. How do i make it show a show 0 instead of blank if there is no records to sum?

View Replies


ADVERTISEMENT

Queries :: Query Showing Two Results?

Mar 19, 2013

I have a query that is showing two results for one product and I have no clue why. I have my tables in a one to many relationship and if I click on the + it shows the correct data for the product in question. Im guessing I have my table set up wrong its the only thing I can think of.

The table tbl_Carton has two entrys for a product (Flex Tape 2-1/16") (Product_PKEY #21) mabe I have it set up wrong? If I run my (qry_Switchboard ) and enter (21) its giving me an extra result for each of the two results thats suposed to be there.why?

View 4 Replies View Related

Queries :: Search Form Not Showing All Results

Jun 18, 2015

I am running Access 2013. I have created a search form with about 10 different categories from a single table. I will only show 5 fields for this example The form is called FrmSearch with

Description
CarNum
SerialNum
Category
Condition

In the query, I have the criteria, Like "*" & [Forms]![FrmSearch]![description] & "*" and have this same criteria for all fields with the proper text field entry. (CarNum, serialnum, category, etc)

The problem I have is that I have over 200 items listed in the Description column but only 2 entries in the CarNum column. When I run the search with nothing in the FrmSearch, it should show all data but it only shows the 2 CarNum. If I put something in the Description, only the two items that show CarNum. I tried to use Is Null and Is Not Null but still doesn't work. I take out the "Like" criteria from the CarNum and it works. So, it seems that it does not pull up all the records because the CarNum has empty fields.

View 5 Replies View Related

Queries :: Combining Query Not Showing All Results?

Jan 29, 2015

Sales will make calls and record data using a form (frmEnquirySpeak) which will save to tblSpeak. If the call results in a meeting being booked then it also updates tblMeeting with a date of the meeting (simple stuff so far!).

A sales person might record up to 14 types of action per day, qrySpeakPerAction counts the different types of call made on a day by day basis for reporting. qrySpeakGroupedAction summarises this down to 8 categories and applies a date filter selected on a reporting form (and this works well).

I now want to include the qryMeetingsBookedPerDay (counts m_date_raised and groups by m_date_raised...eg 2 on 24/12/14, 4 on 28/12/14 etc etc) with the qrySpeakGroupedAction...

My effort so far has resulted in only dates which appear on BOTH queries showing. This may not always be the case.
Every day calls will be made, this may or may not result in a meeting. So I see there being 2 options:

1 - Query to show the count of calls on a date or date range and number of meetings booked each day that calls are made (prefer this method, it sounds simpler)
2 - qryMeetingsBookedPerDay should auto populate days which dont appear as 0 (this sounds messy and not sure what capabilities/speed are like when managers want to spot patterns/trends over multiple years?)

View 7 Replies View Related

Union Queries - Results Showing As Text & Not Numbers

Dec 13, 2007

To cut a long story short, i've got a union query that is a full outer join of 2 tables.

Anyway, the results i have got back needed formatting to no decimal places.

How do i do that?

I've tried leaving it as it is and formatting it in the report, but it still doesn't format and i can't total it up.

It's like it is showing as a text and not number.

Is there a way of converting the result to a number, particularly in a sql query.

View 2 Replies View Related

Queries :: Using Query As DAO Recordset Showing Incorrect Results

Apr 26, 2013

I have a query (that gets it's data from several other queries) with a column called "max." The data in the column is correct, but when I call on the query in VBA, it shows me incorrect data.Here is where I call the query:

Code:

Dim db As DAO.Database, qdf As DAO.QueryDef, rs As DAO.Recordset
Dim strReport As String
Set db = CurrentDb()
Set qdf = db.QueryDefs("7-ErrorsReport")
qdf.Parameters(0) = Forms!frmmain!dt1.Value
qdf.Parameters(1) = Forms!frmmain!dt2.Value
qdf.Parameters(2) = Forms!frmmain!d2.Value

[code]....

The query looks at a table of employees and finds out if they have been issues a warning letter before, then prints out a corresponding report based on the "max" warning level they are at.The problem arises when an employee graduates from a 6 month probation period - all letters in that period should be ignored. As i said, they are ignored correctly when i run and view my query ("7-ErrorsReport") because they are filtered out at that point, but for some reason when this code runs, it somehow sees the previously issued letters which are stored in a table and likely in some of the other queries.

I am not sure if there is some issue with the query tree I have set up which is necessary to get the results I need, or if something is wacked with the was I am using it as a recordsource.

View 3 Replies View Related

Queries :: Access 2010 / Query Not Showing Results From Combo Box?

Aug 13, 2014

Access 2010. This has worked before but I don't understand why this is not working for me now. When i select an item in a combo box in a form and click on a button to run a query with the results, the query is blank. If I run the query alone, it prompts for an item, I can type it in and it works. I have even tried the DoCmd on the combo box but still same results. Attached is a dummy down DB. If you run the query, it will prompt, select Paper or Rock, see results. But run the form, the drop down will not show the results. What am I missing?

View 3 Replies View Related

Not All Results Showing

Mar 27, 2007

I have two database tables, one of information of members and one of staff. I want to do a query to show all members and staff that have the title of 'Mr' in the database.

There are only 5 staff details in my staff database at the moment, all with the title 'Mr'. There are 20 members details, 13 with the title 'Mr'. When i run the query i get only 8 names, 4 from the staff and 4 from the members.

The 4 staff ones i get are the 2nd, 3rd, 4th and 4th records.
The first record of the members field does not have the title 'Mr' and so it appears that this is blocking the first staff one to appear. And the members stop appearing after the 5th record too, so it appears they are stopped as there are no more staff records.

I hope this makes some sense to you, and if anyone could tell me how to get all the records to appear that would be great. Thanks.

View 5 Replies View Related

Showing 0 If No Results

Jul 29, 2007

Hi

I have a query which is made up of several other queries that total different fields (these are a base for a report) sometimes one of the queries will be empty and then the whole query is blank, how can I return 0 when there are no records to count in 1 query so that the results from the others still show?

Thanks

View 5 Replies View Related

Showing Results From A Query

Aug 2, 2005

Does anyone know how to do a query so that the user can find all the things that will expiry at the end of the current month?
The user will click on a command button and it will show the results of a product that will expiry at the end of a current month.
Have tried with parameters to which the user manually types the end date in and then it will show the results but having problems.
Cheers

View 4 Replies View Related

Query Not Showing Results?!

Dec 17, 2007

SELECT Training.ID, Training.StaffPIN, Training.Module, Training.DatePassed, Training.DateExp, Training.Comments
FROM TrainingModules INNER JOIN Training ON TrainingModules.[TrngModule] = Training.[Module]
WHERE (((Training.StaffPIN)=[Forms]![TrainingFrm]![StaffPIN]));

Does anyone know why this query isn't working? It doesn't throw an error, it's just not showing any records.

The only thing I can think of is:
Training.StaffPIN is a long int
When it prompts me for [Forms]![TrainingFrm]![StaffPIN] I enter '12177' in the message box, is that taken to be an int or is it actually a text string?

It might not be this as when I use the form [TrainingFrm] to pass the perameter, it's taken from a combobox ([StaffPIN]) where it IS an int, and the query is still blank. :confused:


TrainingModules is a table that stores all the possible modules or subjects that a member of staff can be trained in
Training is a table that stores which staff member has passed which module or subject.
I want the query to pull all the info on a staff member from Training to be later used as a subform.

View 5 Replies View Related

Offline DB Showing Online Results Through Frontpage

Oct 5, 2006

I have googled and search for this subject and am more confused now...

I am running an offline A03 db with XP and have a hosted website. Right now I have a separate db online that is used for the results on the website, and it works correctly. I used frontpage to create the form.

Now with our offline db I would like to enter the information on a form, and have the results show up on our website, to avoid keying the same info multiple times.

The data that shows up on the website will not be edited, but the table offline will have some fields for edit, that will not show up online.

Is there a way to connect an offline table/query to show up as results online? And if so how or examples? Thanks in advance.

View 1 Replies View Related

Noob - Question About Showing Query Results On Forms

Dec 13, 2007

I am fairly new to access, but do have some experience with SQL & PHP.

I am trying to do something which I would have thought was quite straight forward. But I keep hitting a brick wall and all I get is #name? error on my form.

I have a table "tbl_Job_Spec" and a table "tbl_Tool_List".

I would like to have on the form for tbl_Job_Spec a drop down for selecting the tool number from the "tbl_Tool_List", which then automatically puts into a text box on the form the tools location, which is stored alongside the Tool Number Field on tbl_Tool_List.

I've tried loads of things, I have a query setup ("qry_tool1loc") which seems to correctley identify the relevant information, but when I try to reference that query on the form if just comes up with #Name? in the box on the form.

Anybody got any ideas? I'm only at an early stage in what is quite a big project, but to be honest this is about as complicated as it's going to get, so once I can get past this hurdle it should be plain sailing!!!!!

View 4 Replies View Related

Forms :: Tabular Form Showing Only Specific Results?

Jul 5, 2013

I have a tabular form which i use to input new payments for tenants.

What i'd like to be able to do, is have another form, with a combo box that i can chose my tenant from, then for a tabular form to show only the payments made for that tenant, sorted in date order.

View 1 Replies View Related

Query Showing Different Results When Moved To Chart In Report

Dec 23, 2014

I am trying to use this query. It gives me correct results as query. However when I make chart with query on a report it doesn't show correct data and eventually stops making chart

SELECT qry.txtRC, Count(tbl.txtRC) AS CountOftxtRC
FROM tblMain AS tbl, qryRC AS qry
WHERE (((tbl.txtDepartment)=[Forms]![frmRC]![cboDepartment] Or [Forms]![frmRC]![cboDepartment] Is Null) AND ((tbl.txtZone)=[Forms]![frmRC]![cboZone] Or [Forms]![frmRC]![cboZone] Is Null) AND ((tbl.txtRC )=[qry].[atnRC ID]) AND ((tbl.date) Between [Forms]![frmRC]![startDate] And [Forms]![frmRC]![endDate]))
GROUP BY qry.txtRC , tbl.txtRC
HAVING (((Count(tbl.txtRC )) Is Not Null)) OR (((Count(tbl.txtRC )) Is Not Null))
ORDER BY Count(tbl.txtRC ) DESC;

View 1 Replies View Related

General :: Results Of DLookup Not Showing In Report View But Are Visible In Print Preview

Jun 25, 2013

I have a report with quite a few subreports in it. There are a number of calculated fields on the form, most of which use Dlookup to retrieve at least one of the figures required for the calculation. The Dlookup runs fine and the report opens but the calculated fields are devoid of data in Report view. When I switch to Print Preview view the fields are now populated. Below are two variations of the DLookup syntax I have used to try and alleviate this issue.

=DLookUp("[8]","qry_MonthlyTotalsByYearFirstAid","[ActivityType] = 'First Aid Injury (FAC) Reported in Safeguard'")/[sub_AllHours].[Report].[8]

=DLookUp("[8]","qry_MonthlyTotalsByYearFirstAid","[ActivityType] = 'First Aid Injury (FAC) Reported in Safeguard'")/[Reports]![rpt_AllFigures]![sub_AllHours]![8]

Note that the field [8] specified here is simply a month number and forms a column in the crosstab query for the corresponding query name.

I would add the query referred to in the DLookup to the source query for the report but the source report's data is derived from a Crosstab query, which only accepts one data field (Access terms this as the value field.

View 4 Replies View Related

Queries :: Quotations Database - Queries Showing Too Many Records

Jun 25, 2015

I have a database that is used to create Quotations. After all of the information is entered the queries that hold the calculations must be run. I have lots of calculated that rely on other calculated fields. When I need to Sum all of the calculated fields in one field I must create a new query. I currently have a QuotationID, PartID, and MetalID all linked together. The first of the calculations are done per Metal, and these are working fine. I run into a problem when the calculations need to be done by part. My Queries are creating a record for every Metal and this is throwing all of my numbers off.

View 1 Replies View Related

Queries :: Joining 3 Queries And Displaying Results In Separate Columns

Jul 31, 2013

I have 3 queries named Mech Final Equipment 3 Mth, Mech Final Equipment 6 Mth, and Mech Historical Final Equipment.They all have two fields-Final equipment and Sum of Sum of Down (calculating the number of minutes each piece of equipment was down in the time period selected).

My ultimate goal is to join the three queries to display a pivot chart that uses the Final Equipment as the category field and 3 Mth, 6Mth, and Historical as seperate data fields.What I have is a join query (Which I have named Mech Final Equipment H63 Joined)

Using this SQL:

Code:

SELECT DISTINCTROW [Mech Final Equipment 3 Mth].[Final Equipment], Sum([Mech Final Equipment 3 Mth].[Sum Of Down]) AS Duration
FROM [Mech Final Equipment 3 Mth]
GROUP BY [Mech Final Equipment 3 Mth].[Final Equipment]
UNION

[code]...

Which returns a table that looks like this:

Final Equipment, Duration

Ancillary Equipment, 225
Ancillary Equipment, 401
Ancillary Equipment, 1787
Brush Unit , 1252
Brush Unit , 2519
Brush Unit , 8004

And so on.What I need the table to look like is this

Final Equipment, 3 Mth, 6 Mth, Historical

Ancillary Equipment, 225, 401, 1787
Brush Unit, 1252, 2519, 8004

And so on, like a cross tab.I tried to do a crosstab query but I don't have enough fields.

View 6 Replies View Related

Queries :: IIF Statement Showing All

Nov 10, 2013

I need an iif statement in my query criteria that works as follows:

Code:
iif([Field] = "FirstPossible","str1",iif [Field] = "SecondPossible","str2",*)

The problem is, I'm not sure how to display all of the records if neither the first iif or second iif returns true.

View 8 Replies View Related

Queries :: Combining Data Results From Multiple Queries

Sep 30, 2014

I am working on a report that has some special characteristics.

Let's say I have a list of groups of Vendors in a table, complete with VendorID. I have 3 other tables that use the VendorID: Complaints, Complements, and Terminations.

Each of these tables has a date that the Complaint, Complement, and Termination notice was received.

Every Fiscal Quarter, a report is pulled that looks back over the 4 preceding quarters to determine if a 5% threshold has been crossed by any of the vendor-groups in regards to the amount of Complaints they received.

The equation used for that is : (complaints/vendors_in_group)*100

It is imperative that the information has the current fiscal year and fiscal month (which I am tracking with functions from MS website), and I need to be able to store the information attached to the fiscal year and month.So when a user goes to the form and inputs the desired Fiscal Year and Fiscal Month, the database can display the 4 previous quarters of information...split into Q1, Q2, Q3, and Q4.

What I would like to have happen is to be able to have one table where the information is stored, quarterly, so that it can be retrieved for the report.

Questions:
1. Is it possible to have one line, per VendorID, that has the total number of Complements, Complaints, and Terminations, as well as the threshold percent stored in a table? Right now, I am getting LOTS of duplicates and blank lines when I try to put them all together. It has the right data, but takes about 10 rows per VendorID.

2. It is very important that the total number of Vendors in a group be captured on that quarterly report, so maintaining that number, in the same table, is essential and must be tied to the VendorID.

3. I have looked at Union Queries and Crosstabs, but I just dont know enough about them to make it work.

View 4 Replies View Related

Queries :: Showing Available Vehicles By Dates

Mar 26, 2013

We have vehicles which are lent out to employees on a daily basis,

I currently have a query shown as a report which vehicles are out between the given dates using this criteria in a query

>=[ENTER Start Date] And <=[Enter End Date]

what I want to be able to do is show which vehicles are NOT being used between these dates tried a few different ways but no success

View 5 Replies View Related

Queries :: Max Not Showing Only Biggest Date

May 13, 2015

I have 3 Tables with relationships between Pupils to Read and Books to Read:

Pupils ID, Forename, Surname
Books - BookID, Book, Author, Level, Genre
Read - ID, BookID, DateOut

On another thread in the forum I got to the position of the code below. However this code does not select only the read book with the biggest(latest) date, the Max, it displays all Read books.

SELECT Pupils.ID, Max (Read.DateOUT) AS MaxOfDateOut Books.Book
FROM (Books) RIGHT JOIN (Read) ON Books.BookID = Read.BookID) RIGHT JOIN Pupils ON Read.ID = Pupils.Id
GROUP BY Pupils.Id, Books.Book
HAVING (((Books.Book)<>"Blank"));

View 14 Replies View Related

Queries :: Showing Running Total For Each Month?

Oct 12, 2013

I have a list of products that have a loan payment associated to them. To cover these loans, we have incoming revenue for each product at different dates.

The incoming revenue is a field of running sum of revenue for each product.

Desired output:

I want to how how much % of loan (jn total; for all products) is paid in October, november and december and as such (as cumulative). i.e. total of 40% in Oct, 70% in Nov and 100% by Dec etc.

I am attaching the database, with sample data.

View 1 Replies View Related

Queries :: Dates Showing Up For Multiple Months?

Jun 18, 2015

I have a query that is supposed to be showing todays data (as it is labeled) but it keeps pulling today's number date (i.e. the 1st, or the 17th) for every month, when i only want June 18th not including jan/feb/march etc. 18th.

I started running this query in may, that's why it only shows may and june's data.

I'm thinking it's definitely a problem with the criteria but check out the attachments and let me know

View 14 Replies View Related

Queries :: Query Not Showing Data From Table

Dec 12, 2013

I am trying to run a query and for some reason its not showing the data from the table (its blank), this is a monthly reporting I do - last months query works perfectly.

Table: log and list

Here is the SQL

SELECT log.*, UL.langue, UL.version
FROM log, (SELECT list.id, list.[langue], list.version, list.no_joueur FROM list GROUP BY list.id, list.[langue], list.version, list.no_joueur) AS UL
WHERE (((log.id)=[UL].[id]) AND ((UL.no_joueur)<90000000));

Table has all the columns.

View 1 Replies View Related

Queries :: Data Not Showing Up In Query But In Table

Jun 19, 2013

I am working with a database and existing query from my predecessor. The field in the query appears in both the database table and the query.when I run the query it doesn't appear. Is there a limit to the number of columns in a query I easily added a new column and moved a column,

View 9 Replies View Related







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