I am building a database to help my unit in Iraq. Here are the fields I have so far.
Field 1: Date
Field 2: Time
Field 3: Location
Field4: SIGACT (Significant Act)
Well that is the basics look like. I would like to be able to count the number of times a type of SIGACT occured in durring the day, week, and month. I would like to have this come out in a report I could then take to Excel and graph. The SIGACT has a couple different options like IED, and SAF. Thanks for any help you can provide
It basically is used to create, manage and track Customers, Parts, Work Orders and Suppliers, payments and employees.You simply create a Customer and then create a Work order that contains a list of parts and labour items.
What I want to do is to create a "Kit" of parts so that the user does not have to select each part individually when they create a Work Order. For example, if I use a mechanics workshop as an example, the mechanic may sell his "Signature 1916cc Engine" that consists of 40 different parts and some other items such as labour and other services. In this scenario, instead of the user individually selecting 40 different parts, all he needs to do is select the Kit called "Signature 1916 cc Engine" from a drop down list and all of the 40 parts and other items would automatically populate the correct Work Order Parts/Labour tables.
I would also like the user to be able to select another "kit" that would either replace all parts and labour records or append to what is already there.
I have changed the form called "Workorders" to have 2 buttons. One called "Load Kit" the other called "Save Kit".If the user presses "load Kit" a form will be displayed that enables them to select a "kit" from a list and whether they want to replace all of the existing parts and labour records or if they want to append to the existing records.
In order to create a new kit, the user can simply manually create a new work order by individually selecting each part and labour item and then pressing the "Save Kit" button. The user will then be asked to provide the short name of the Kit and the long description (I have created table called tKit). The new kit will then be saved.
It appears that the "Entered by" field that is linked to the Employee table must not be blank other wise the Workbook is NOT saved....I have tried to figure out why this is happening but can't!
The Work Order Parts are stored in "Work Order Parts" and the Work Order Labor is stored in a table called "Work Order Labor". I have created 2 extra tables called "tKitWorkOrderParts" and "tKitWorkOrderLabor" that I assume will contain the items that make up the kits..
I have a report due the first of each week in which I need the cases open and cases closed for the previous week, the week two weeks prior and the 2007 and 2006 year to date on two different types of cases. I have a case management table with a field for Type of Case, date assigned and date closed that I uses in my queries. Presently I have two query, one that generates only Type 1 cases from the Case Management Table and another for Type 2. I then use the Type 1 Query in another query that limits the results for Type 1 cases to those opened last week, one for those open two weeks ago, one for 2006 YTD and one for 2007 YTD. In these 4 queries I have one field [Type of Cases] and I have the query count. I then do this for Type 2 cases and then go through the whole process to do Closed Cases. All my queries have criteria to automatically filter the dates to the time periods mentioned above. I then have one report query that I put all the number in for my report. This query has 16 fields with the numbers for each period, last week open and closed, 2 weeks open and closed, etc. I then generated a report that takes these numbers from my report query and puts it in a report format automatically. As you can imagine this takes some time to go through each query to generate these numbers, so I was wondering how I may do this differently. Also, I have experienced a problem when a field produces no records I get a blank sceen with nothing under the Count of column and get the same thing for my report. How can I fix this.
In trying to write code to automatically hide database window I have completedly stffed up and now have code that closes the database window everytime I startup, hence closing the database.
Does anyone know how to disable VBA or somehow keep the database open??
I'm working on a database used to dispatch first aiders to events. The general structure is a form detailing the event with a subform (currently pulling info straight from a join table though I may change the data source to a query at a later date) containing details of attendees in list format.
I have a record in the events form that shows the number of first aiders attending which is currently updated manually. In the subform however, there is a tick box as to whether they attended as sometimes they enlist but have to cancel for whatever reason.
I wanted to implement something that will count the ticks and update the number attended field automatically.
I don't know alot about VB and have tried using the count expression function in the subform footer then setting the number attended field to equal the count field. The problem I find with this though is firstly there can sometime be a delay in updating this and secondly I need the number attended to appear in a report listing all the duties attended each month for expense claims.
I may be half way to hitting the mark with what I've tried but if anyone could suggest anything, I'd be very grateful.
Quick overview. I have a site # and Subject #. The subject # is 7 digits and the first 4 are the site # (exp. Site # 1000, Subject # 1000001, 1000002, etc). At times the subjects switch sites but their subject # remains the same so Subject # 1000001 now resides at site # 2000.
How would I write a query like the following?
Count [tbl_Enrollment]![Subject #] WHERE [first 4 digits of the subject #] LIKE [tbl_Site_Dem]![Site #]
I have a student with an access table that has fields names week1, week2 etc. The data in these fields is either a '1' - meaning present or a '0' meaning absent. We want to be able to put a formula in a query that counts how many absences there have been (similar to a =countif formula in excel)
Got another problem that I'm sure you guys will solve with your eyes closed ;)
I've got a database with a field called courier_no. Imagine this set of data.
1234 1234 1266 1277 1277 1288 1299
I want to run a query to count the number of instances that each number appears. For example I would expect the results 1234 2 1266 1 1277 2 1288 1 1299 1
I then want to run a criteria on the count field (But I think I'm ok with that bit once I've solved the counting of the data.)
I've tried the count function in the query builder but it doesnt total the instances that each record appears.
Help please (and please keep it simple cos you know I struggle with all that VBA stuff :D)
i'm sure there is a simple soultion to what i want to do but my brain isn't helping me at the moment...
i have a table called bookings with a column called nono which consists of dates with each date being a booking for a bed....
i want to be able to run a report for instance which tells me how many beds have been booked between two dates and year to date...
how do i go about doing this the most efficient way.... i can get a count for one particular date without a problem... and i know i could go and write out totals for each date in the range and then add them up...
however, is there a better more effieicient way of doing this???
I have a table with two fields: Company, Product_Name Currently the table is not normalized (which is what i am now trying to change). While the Product_Name are unique, the Company names repeat themselves (one company has several products).
I will like to find out which company has more than 10 products and see the names of these companies in a query.
Can I achieve this simply through SQL? If not, How do I accomplish this with VB?
As always, all assistance is highly appreciated. Thank you.
In my form (on which I have removed record selectors) I would like to display the number of total records. Is there some way of inserting this information in a text box or other control?
Recently I've been having a problem with Access (2003) that I can't seem to get around. If I click on "NEW" to create a new query, do some editing, then go to close, it prompts me as to whether or not I want to save, which would be ok, if it would let me choose NO!!
I only get OK or Cancel options. I've NEVER had this problem before. I have not done any updates added any addons. Is there some hidden trick here or some way to get around this cause its really annoying.
i'm trying to get a count of how many customers made billing requests during the month of november. the query is based on one table in the database. some customers made multiple requests, but i'm looking for the number of different customers who made requests, not the total number of requests made. the following sql stuff weeds out the duplicate customer numbers and lists each unique customer number.
SELECT DISTINCT TBLBillingRequest.MemberID FROM TBLBillingRequest WHERE (((TBLBillingRequest.DateSCSCLogged) Between #11/1/2005# And #11/30/2005#));
my problem occurs when i try to to incorporate the count function like so.
SELECT DISTINCT Count(TBLBillingRequest.MemberID) AS CountOfMemberID FROM TBLBillingRequest HAVING (((TBLBillingRequest.DateSCSCLogged) Between #11/1/2005# And #11/30/2005#));
it gives me a count, but the count includes duplicate customer numbers as well, not the total of unique customer numbers, which is what i want.
any suggestions/help would be greatly appreciated!
Hello All, I have what I hope to be a simple problem to fix. I have 2 tables: tbl-Agents and tbl-Reviews Every employee is an agent however; not every employee has a review for month(x). I am wanting a count of all reviews done for each employee even if they do not have a review done.
Joe Smith exist in tbl-Agents and also has 10 instances in tbl-Reviews for October. He will show up given the sql below. Cathy Jones exist in tbl-Agents but does not have any reviews in tbl-Reviews for October. She does not show up given the sql below. I need the output to look like Joe Smith October 10 Cathy Jones October 0
SELECT [tbl-Agents].AgentID, [tbl-Agents].[Dept/Bucket], [tbl-Agents].AgentName, [HISTORY-Q].ReviewMonth, Count(*) AS Expr1 FROM [tbl-Agents] LEFT JOIN [HISTORY-Q] ON [tbl-Agents].AgentID = [HISTORY-Q].[Emp Num] GROUP BY [tbl-Agents].AgentID, [tbl-Agents].[Dept/Bucket], [tbl-Agents].AgentName, [HISTORY-Q].ReviewMonth HAVING ((([tbl-Agents].[Dept/Bucket])="Bank Card 61-90dpd") AND (([HISTORY-Q].ReviewMonth)="October"));
i have a query which find all the records of stock that are similar. I want to count how many of these there are. How would i go about doing this?
I then want the user to type in the system they want, how many they want, and this will "remove" the system from the list, but not from stock i.e. makes it unavailable. The query is been created from the stock, and so everytime the query is run, it would overwrite the "unavailable stock". If any one could help, this would be great!
I am writing a query to determine employee's commissions. The commission rate changes for all order over the first 15 per employee per week. What would be the best way to write the formula?
I have two tables, RMA Numbers and Serial Numbers. Each RMA number will have multiple serial numbers assosiated. I need to find a way to count how many serial numbers are assosiated with each RMA number.
I think the best way to do this is in a query using the dCount function some how.. but I can't figure out how to get it to count different serial numbers for the same RMA number.
I also considered writing my own function to do it.. but it got really messy and there must be an easier way to do it..!?
"relationship must be on the same number of fields with the same data types" data types are same, numbers.
Primary table has just jobnoID that are all unique (primary table) ie 6907, 6908, 6909 etc
second table "jobs by order" (secondary table) has unique orderno(order numbers) in column one say 69071 and 69072, 69073 and jobno in second coloumn say 6907, 6907, 6907 for all the above.
trying to link JobnoID primary table (one to many) to Jobno secondary table (many)
Also need to note. This database is a purchase order database. so am trying to load in all past data from excel. data is in already. so primary table above with jobno is an auto number so will generate the new jobno for us. but had to copy and paste blank fields into table to get records upto the number we are upto now, ie job number 7112. I have only put data in secondary table for jobno's 6885 through to 7112, and even some of these have blank spaces.
Any ideas? Also how do i do a screen capture and dump in here so you can see relationships etc, which would be a whole lot easier to explain. thanks heaps Alastair:rolleyes:
I have a table (Master) that contains columns such as MsgLocation, MsgName, MsgScript, and MsgTxt. I want to create a form where the user would have an area to type in a 'string' and when they hit enter (or select a button), a (background) query would execute a lookup on master "where MsgTxt LIKE %string%"... For example, if a user wants a list of all MsgTxt values that contain "Please hold" they would type in a box "Please hold" and the query would use %Please hold% in the search criteria.
I don't have a clue on the first thing to do to get this done. And I'm new at this...
I am trying to create a Switchboard of my own that will do everything the database window will, but restrict certain users from accessing certain areas of the switchboard. The only part i am needing assistance on is Adding, Deleting, Modifying and Running my database items from the form.
I already have used that MSysObjects code to create list boxes for my Tables, Queries, Forms and Reports. Now, I'd like to setup 4 custom command buttons on the form that say:
Code:Private Sub AddTable_Click () [listTables.Value = New Table, prompt user for standard New table wizard]End Sub Private Sub DeleteTable_Click () [listTables.Value = Delete this table (with normal "Are you sure" prompts)]End Sub Private Sub ModifyTable_Click () [listTables.Value = Open this table in Design view]End Sub Private Sub OpenTable_Click () [listTables.Value = Open this table in Datasheet view]End Sub
Now, I know that this code is by far not the correct code, but I hope it helps you understand what I'd like to do. Basically, I want the button to correspond with whatever is selected in the list box for that item (except for the add button, it really doesn't matter what the listbox says when the add button is pushed). As far as my list boxes go, i'd like 2 functions for it to do:
1. If a table/query/etc. is double clicked, that item is opened.
2. Allows multiple selections to delete. (i.e. the user can select multiple tables and click the Delete button, and all the tables that are selected are deleted.)
Let me know if all of this can be done from my form. It would be great to get all this working by tomorrow. I appreciate all of aspfree's users help. You guys rock!
Hello everyone! I'm new to this forum and this forum has been a very useful resource on creating my first database. I know nothing about coding and this is my first time trying to create an Access database for work. I have been working on this database for more than 4 months and this forum really helps me from creating tables all the way up to forms. THANK YOU!!
Now, I'm struggling on creating reports that counts records from my tables. Here are two of my problems:
First:
I have a main table called "tbl_main" which records students' basic information, including their birthday in a column called [dob] in mm/dd/yyyy format. I need to create a query that counts how many students in age 11, 12, 13, 14, 15,16, and 17 separately so I can list them on a report.
Second:
I have a enrollment history table called "tbl_enrollment" which records dates that students had been in and out of the school. Since a student can re-enroll for more than once, there are more than one record for the same student. I have student ID [idnumber] and admitted date [admitted] columns in this table. I need to create a query that gives me a total number of enrollment, number of one-timer, and number of repeater, so I can list these numbers on a report.
For both reports above, user will input a timeframe to count particular number of records. Thanks to this forum, I already have a working form with start/end fields for user to input. What I'm struggling is creating queries to count records.
Thanks again for spending time reading my first post in this forum and I hope I can get helps from anyone of you. Since I'm not a programer, you may need to step-by-step walk me through the whole process. Sorry!!
I'm having trouble getting a query to return a simple count of unique lot numbers for a given ProductID. The data is stored in a large table where each test result of a stability program is stored. Each result has an associated lot number, product id and several other data fields. I've managed to get a combination querries to return the count, but if the lot has both real time and accelerated data then the counts are added and reported as double for each type. The current SQL is as follows.
SELECT tblProducts.ProdName, Count(qryAccelerated.Lot) AS AccelCount, Count(qryRealTime.Lot) AS RTCount FROM qryRealTime RIGHT JOIN (qryAccelerated RIGHT JOIN tblProducts ON qryAccelerated.ProductID=tblProducts.ProdID) ON qryRealTime.ProductID=tblProducts.ProdID GROUP BY tblProducts.ProdName ORDER BY Count(qryAccelerated.Lot) DESC , Count(qryRealTime.Lot) DESC;
qryAccelerated and qryRealTime are simple SELECT DISTINCT querries returning the product id and a list of unique lot numbers for that ID.
(e.g. SELECT DISTINCT tblResults.ProductID, tblResults.Lot FROM tblResults WHERE (((tblResults.TypeID)=3));)
Currently the top query returns 4 in the both the AccelCount and RTCount columns when there are only 2 unique lots for the product. Other products without both real time and accelerated lots count correctly.
I've been searching the Queries Forum for help on this issue. I have a database that records loading records for a Taconite facility. Some days contain many records and on other days there are no records because of no loading activity. I create reports that group these loading records by each day, but I really need a quick and dirty report that just shows me the number of days in any month in which we had loading activity (records present). I have not figured out a way to create a query which counts the number of days in a month which contain records. I'm hope I'm explaining this well enough for someone to help me understand what to do.
What I would like to do is create a query which returns a list of all the holidays with a field showing how many bookings have been created for each holiday. This almost works:
SELECT Count(1) AS CountOfBookingID, Bookings.HolidayID FROM Bookings GROUP BY Bookings.HolidayID;
...but it does not display holidays where there are no bookings.
Is it possible to create one which will show all holidays even if there are no bookings?