In forms, I frequenty use the following expression to get the results needed from a field's column:
=EmployeeID.column(1).
However, when I try to use the column function in a query it doesn't like it:
EmployeeName:[EmployeeID].Column(1)
What am I doing something wrong?
Along the same line, if I want to use =EmployeeID.column(1) for an unbound control in a form, why must you put the bound field on the form just to get the info? In this case, I want to do this to display the employee's name - not the primary key - without the scroll bar. Every time I do this, Access performance analyser tells me to use fewer controls, but you can't if you have to have the reference. The same thing seems to be required in queries, i.e. include the unaltered control to get an expression.
Help and advise, as always, will be appreciated!
Christine
I'm creating a form to count the number of employees with birthdays between 2 dates. There are 2 unbound date fields; Start_Date and End_Date. I have an Employee table with DOB field. I've been stuck on how to get the field to return the correct number of employees that fall within the 2 dates.
When I run a query, whenever the criteria is not met, I want the column header for the row to not show up in the query.
I am running a select query and I have 10 items on the query, I select what I want via check box and then hit OK to run the query. I want the fields that are not checked to not show up in the query at all. Right now I still get the column header, any way to get rid of it. Thanks a lot for any help.
I just started my internship a couple weeks ago so I am still relatively new, but here's my problem...I have created a query to run the weekly statistics for my data but one column continues to show multiple times. I want the "Left in Estock" and "Left in Estock Line Items" to only show once, instead of all the way down the side. Check out the attachments.
I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong? Thanks,
I have a form that I am trying to show in a text box the results of a count query. The query has two fields in which one is a check box. The criteria for the text box field is set to true to list all that are checked. I want the query to show all the records that are true. This works if I run the query, but the result isn't showing in my text box on the form. On the form text box properties in Control source I have =DLookUp("[Run Number]","Control Room Drumctqry"). Run Number is the field that I am counting, Control Room Drumctqry is the query. Any idea as to what I am doing wrong? Thanks,
I have a list of companies that need to return paperwork, we are then scanning that paperwork and placing in a directory and listing that it was received in a table in Access. I want the button to view this scanned in item if the qry for that paper work has arrived and the count is >0.
I run a command on a single form that if a qry is >0 it shows the button and I added that to the GotFocus event in the form.
I have a query where I need to incrementally count the repetition of column values and add that value in a new column.
Example: "Column One" and "RepeatCounter" are fields in a query.
Column OneRepeat Counter Value 11 Value 21 Value 31 Value 12 Value 13 Value 32
I want to create the outcome in the field "Counter" in an Access Query. I am a novice in Access VBA. I found I can do it in Excel with the formula CountIF. I am unable to do it in Access.
Select Year,Type,Count(*) from Table group by Year,Type;
I am running the above query to create a bargraph:
Result of my query: Year Type Count ---- ----- ------ OCt-10 Type1 5 Apr-11 Type 4 4
Expected graph:
Y axis Counts X axis Year and then Type together
Two bars in total : One bar for Oct-2010,Type 1 showing a count of 5 One bar for Apr-2011,Type 4 showing a count of 4
Is it possible to show Year as well as the Type values as labels in X axis in a barchart. I know it can be done with pivot charts but I dont know how to create it as a report with pivot barchart .
I have a list of clients in a query field and I want get a count of the number of unique clients. Some records have duplicate clients. Lets say there are a hundred records but only 50 unique clients. When I apply "unique values" in the query's properties, and then enter "Count" in the Sum field, it gives me a count of 100 not 50. When I remove the Sum field, it lists the unique values correctly (50). Thanks.
Have developed an Access dB for logging and reporting on support issues. The following query is used to show how many issues are raised in a specified time period.
SELECT ISSUES_BY_SYSTEM_AREA.report_category, Count(*) AS instances FROM ISSUES_BY_SYSTEM_AREA GROUP BY ISSUES_BY_SYSTEM_AREA.report_category;
REPORT_CATEGORY can have a number of values e.g. Technical Support Issues Configuration Changes User Admin Other
I have two questions (1) How do I get it to report for each category even if the number of intances is zero? For example, if there have been no instances of 'User Admin' this month, I want the results to show as follows (2) How to show the sum of these as well
For example what I want to be returned is: Technical Support Issues 5 Configuration Changes 14 User Admin 0 Other 2 Total 21
Currently this is what would be returned: Technical Support Issues 5 Configuration Changes 14 Other 2
Is there anyway I can add a sort of count field to my query, for example what I require is the result of my query to include a column which counts the rows in the queries.
Is there anyway I can add a sort of count field to my query, for example what I require is the result of my query to include a column which counts the rows in the queries.
I am new to Access and was trying to figure out a simple Count. What I want to do is Count Column A if Column B has "".
I have looked around and am sure this is easy, can anyone point me in the right direction. I use this for another item but dont know what to add to make it work like I would want.
Yes i'm having trouble with a Count problem, don't laugh at me.
I've got a query with 200000 plus records. Each record has an equipment ID number (its not the primary key) in column B. I just want to count up the number of records that have each equipment ID code, but im not sure how to do it.
I have one table with one column that I am trying to extract data from.What I would like to do with the Column is split it into a few counts. The Column has numbers in it with KB usage. What i'm trying to do is count the amount of users that use say 0. Then have a column next to it that count say 500 >= 2000 and so on. This is completely baffling me as to why I can't seem to do this. I've even redesigned the database to see if I could fix this problem, but no luck I can build a query for this to be done sepearetly, but can't seem to find a way to put it into one query.
SELECT Count([test Usage].StaffPhoneID) AS CountOfStaffPhoneID, [test Usage].[Nov-14], [test Usage].[Nov-14], Count([test Usage].StaffPhoneID) AS CountOfStaffPhoneID1 FROM [test Usage] GROUP BY [test Usage].[Nov-14], [test Usage].[Nov-14] HAVING ((([test Usage].[Nov-14])=0) AND (([test Usage].[Nov-14])>=500));
I'm building a report for annual software license renewals. The report data source is a query that combines the customer information, their computer information, and the licenses purchased for that computer. I am having no trouble with the form displaying the customer info page, then a page with the computer info at the top and a list of licenses purchased for that computer underneath.
That would be great, if that's what my boss wanted. However, she wants the whole list of available licenses displayed on each page, in the event someone want to purchase additional licenses with this year's renewal.
I'm trying to figure out how I can set up a query/report grouping to do that. I've tried making a new query, relating the qryLicense!licenseID to the qryPurchase!purchLicense and setting the relationship option to show all records from qryLicense and only those related from qryPurchase. I added the qryPurchase!purchCPU field to my query, hidden it, and set the criteria to “=1” (the computer ID of one of my dummy computer records). I also have a Sum of the qryPurchase!purchQty field included in the new query that I want to display the total number of that particular license purchased (and 0 if there are no corresponding records). All fields except for the quantity field are set to Group By.
What I’m getting from this is simply a list of the licenses purchased for that computer, not the complete list of licenses available showing the quantity purchased where applicable.
I'm stuck on this one part of my code where I am trying to count values in a column called 'ItemQty' in table 'dbo_Item'. I only want to count the values with the associated values in column 'OrderNumber'. I am getting the values of 'OrderNumber' from an array. Here is my code...(it doesn't work though. When I put a Msgbox to print out what the ItemQuantity value ends up to be, it only prints my code back to me.)
Code:
For Each Order In q MsgBox "Order = '" & Order & "'" ItemQuantity = ItemQuantity + ("count(ItemQty) Where OrderNumber LIKE '*" & Order & "'") Next Order
I have a bunch of records in 1 table. Some records could have 1 duplicate field. What I am trying to do is create a query that produces the total or count in a new column. For example:
ID FName SName Account#
If account appears more than once, I would like a new column to count the number of times in total that record appears. Then use this in a report afterwards.
I have attached a file with Table, Current Result & Desired Result.
I have a table with Month, A, B to G with True or False check box inputs, what i need is on every month, in each category what is the total False;
In the past, i created a count query for each category like A to G and then finally link it. So i want to simplify it and i used below SQL but its giving me the result but not in a good format
SQL used
SELECT Tbl_DateMonth.[Month], Count(*) AS A, '' as DA_FIEPending, '' as B,'' as DA_PFMEAPending FROM Tbl_DateMonth LEFT JOIN ([MasterTable_ EngineeringChanges] LEFT JOIN [MHEX Processors Update] ON FROM Tbl_DateMonth LEFT JOIN ([Table1] LEFT JOIN [Table2] ON [Table1].UniqueID = [Table2].[Unique Id]) ON Tbl_DateMonth.[Effective Month] = [Table1].[Effective Month]
I have a database about certain accounting datas from week by week and it's growing. I should make a Crosstab query for see the amounts weekly, it's will be exported to an excel workbook, wich have macro's(this is the problem, because the exported field will be bigger week by week). The difficulty of this query is the future weeks. I want to see all of the weeks in the columns. I made a table wich contains the weeks(Hetek_1.CW) wich I want to see, and the source is also contains the items accounting weeks.
Code: TRANSFORM Sum(CWall_hetekkel.[Knyv# ssz# kltsg]) AS [SumOfKnyv# ssz# kltsg] SELECT CWall_hetekkel.[Ktgh# kdja], Oka.Oka FROM Oka RIGHT JOIN CWall_hetekkel ON Oka.Oka = CWall_hetekkel.Oka WHERE (((CWall_hetekkel.[Ktgh# kdja])=1250 Or (CWall_hetekkel.[Ktgh# kdja])=1251 Or (CWall_hetekkel.[Ktgh# kdja])=1252 Or (CWall_hetekkel.[Ktgh# kdja])=1253)) GROUP BY CWall_hetekkel.[Ktgh# kdja], Oka.Oka PIVOT CWall_hetekkel.CW;
Below is the code for my query. The columns are by week. One column is a GrandTotal of all the weeks that are displayed. The other columns are by week and show the total number of problems by week. My issue is as follows. Some weeks there are no problems leaving the column blank. I would like to show 0 if there were no problems for any particular week. Does anyone know how I can accomplish that?
PARAMETERS [Forms]![Queries_ReportsFRM]![StartDateTxt] DateTime, [Forms]![Queries_ReportsFRM]![EndDateTxt] DateTime, [Forms]![Queries_ReportsFRM].[FaultCategory] Text ( 255 ), [Forms]![Queries_ReportsFRM].[SystemGroupProblem] Text ( 255 ); TRANSFORM Sum([Trends-1-3TON-WEEK].Totals) AS SumOfTotals1 SELECT [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory, [Trends-1-3TON-WEEK].Problem, Sum([Trends-1-3TON-WEEK].Totals) AS GrandTotal FROM [Trends-1-3TON-WEEK] GROUP BY [Trends-1-3TON-WEEK].SystemGroup, [Trends-1-3TON-WEEK].FaultCategory, [Trends-1-3TON-WEEK].Problem PIVOT [Trends-1-3TON-WEEK].YearMonthWeek;
In this table it has a bookingID, CustomerID and some other none relevant details.
The CustomerID comes from table tblCustomer. i.e a customerID must exist in the customer table to be allowed in the bookings table tblBookings
A customer can exist in tblCustomer without existing in the booking table.
I am trying to write a query that will list each and every customer ID in the tblCustomer and count the number of bookings that that customer has (even if it is zero).
I have a query that will count the bookings if they exist in the booking table and display the number of times that a customer appears in the bookings table.
SELECT tblBookings.CustomerID, Count(tblBookings.CustomerID) AS NoOfBookings FROM tblBookings GROUP BY tblBookings.CustomerID;
How do I create a query that will do this but list all customers even if they don't exist in the bookings table (but obviously occur in the customers table)
I am trying to create a similar query where all bookings per hotel are listed even if no bookings are made for that hotel. I am guessing the answer is the same as above.
The Ritz. Bookings 0 The Hilton. Bookings 3 The Carlton. Bookings 0 The Lowry. Bookings 2