I am trying to create a Database that will type our orders. I have a table with our customer list that includes both billing and shipping information. The problem is that sometimes one customer will request a "drop shipment" to another customer. Is it possible to retrieve different data from two different customers? Billing info for customer "A" and shipping info for customer "B" without creating seperate tables?
I have an Access database with a table that contains 11 fields. The first is a unique ID and the other 10 fields are various numbers. I need to know which of the 10 columns contains the highest number for each row and return the 2 rightmost characters of that column name. I started with the "maximum" function that I found on-line and it works to give me the maximum number in each row, but I need it modified to return the 2 rightmost characters of the column name that contains that number.
Code: Function Maximum(ParamArray FieldArray() As Variant) ' Declare the two local variables. Dim I As Integer Dim currentVal As Variant ' Set the variable currentVal equal to the array of values.
I am working on a database for a Skip Delivery Company, I have all relevant tables and Forms done and can add customers and so on. I have a field name in my Skips Delivered table called Delivery Docket which contains a long list of customer dockets. What i want to do is, be able to retrieve all customer information (such as Customer Name, County, Location, Phone Number and so on ...) on my Skips Delivered form by just entering the docket number on that form. I'm thinking i need an SQL Statement somewhere?
I have groups and members tables in which each group is formed from no. of members, each member can take loan and will return this loan in a no. of installments so here my problem is when i run the query to retrieve no. of loans she has taken and no. of repayments she has given, this query retrieves same loan amount duplicate ... How to group by this query so that when i run this query it should only retrieves that no. of loans (no duplicate) she has taken and no. of repayments (no duplicate) she has given...
For ur more information I attached the db here ...
I have been working on a normalized db for the past few months and it works wonderfully. But now I need to find a way to create a form so that the rest of the company can update their data.
My Table has the 5 following fields. Also listed is an example of the types of data I have there
As you can see I have multiple StoreID's for one store, IN00001. My db goes up to IN00419 so it ends up displaying 29,664 records. There are 4 different categories (Japanese, Chinese, Local, and Other). Until now everything has been taken from a datasheet and put into an Update Query but now that other people have to quickly access the system I need a slick interface.
What I need is a way to have a form that can update the table and add new entries that looks like this in the form:
IN00001____2005________Jul__Aug__Sep__Nov__Dec__EC T. Japanese MixPercentage__.01___.02__.01___.03__.01 Chinese Mix Percentage___.35___.25__.26___.33__.30 Local Mix Percentage_____.60___.70__.69___.62__.65 Other Mix Percentage_____.04___.03__.04___.02__.04
IN00001____2006________Jul__Aug__Sep__Nov__Dec__EC T. Japanese MixPercentage__.01___.02__.01___.03__.01 Chinese Mix Percentage___.35___.25__.26___.33__.30 Local Mix Percentage_____.60___.70__.69___.62__.65 Other Mix Percentage_____.04___.03__.04___.02__.04
I hope this gives you a clearer picture. I need to be able to update 96 entries at a time (12months, 4 customer types, 2 years) but do it in an efficient manner. The table only has 5 fields so I need to figure out how to display multiple entries on the same form. I also need a way to add new entries. In other words for me to add another StoreID such as IN00420 then I would have to enter in a value for every field for 96 records in the table. When in reality I should only need to update the mix percentages since the months and years remain constant. HELP!!
Any help would be much appreciated. Due to the variable nature of the db I cannot establish very many one-to-one relationships. So therein lies another problem.
I trying to create a query that just returns all of the records in my database for the past year. I've tried to somehow do it using the date() function but haven't had much luck yet. Any help is most appreciated.
I have a query which I'd like to create which would be to retrieve records from a specific month of a specific year, in this format "01/14" "02/13" etc..
Obviously it would need a prompt box for the query for the user to input the month and year.
I have two Tables, "staff data" (staffID, name) and "issues log" (IssueID, StaffID, 20+ fields about individual Issues). StaffIDs are linked together so each employee can have multiple issues..I have (so far) Form1 containing individual Issues that can be filled in, or retrieved one at a time / scrolled through in IssueID order
What I want is a second form, containing a combobox with all StaffIDs (+ names) listed; when a StaffID is selected, a table is loaded containing all Issues for that employee. When any of these is selected, Form1 is loaded
I have created the second form, including the combo that contains both StaffIDs and Names. I can't yet grasp how to show the set of Issues applicable to that employee when I change that combo...If I could have the combo on Form.
I am working on a project where I am creating a database that tracks open orders (old and new orders that still need to be billed but haven't been billed for one reason or another).
I have my "Master" table built and now I need to create 2 queries, one query retrieves the Top 20 orders based on value and that are older then 30 days and the second query is to retrieve the Top 100 orders based on the same criteria but the Top 100 query should not include the orders that appear in the Top 20 query.
My Top 20 query is below
SELECT TOP 20 MASTER.COMBO, MASTER.[Customer Name], MASTER.Status, MASTER.CCD, MASTER.Area, MASTER.[Order Type], MASTER.[Order Value], MASTER.AGE, MASTER.ANALYST, MASTER.COMMENTS FROM MASTER WHERE (((MASTER.AGE)>=30)) ORDER BY MASTER.[Order Value] DESC , MASTER.AGE;
I have tried multiple ways to do the Top 100 query and exclude what is returned in my Top 20 query but so far no success.
I have an SQL statement that looks something like this:
SELECT * FROM tblBandwidth WHERE (DateCreated > (DateAdd('m',-1,Date())));
So... would that retrieve all the records which are a month old (ie 31 days old, for example), or would it return all of the records that were made in the current month... there is a big difference!
I basically want a way of returning all of the records that were made in the current month.
I'm creating a form that has combo boxes pertaining to each of the following fields from table "Documents": DocumentID (primary key), DocumentTitle, DocumentAuthor, and DocumentYear. No combo box is used with any priority over the others. The working form will allow a user to retrieve the full document record (data for all fields) by using any combo box they want, as well as any combination of combo boxes. This means that if a selection is made in one field's combo box, the drop-down lists in the other boxes need to update based on that preliminary selection. The filtered results for each field, based on any and all combo box selections, are always shown in a single datasheet on the form.
The kicker is that when a user starts filtering records by making selections from the drop down list in a combo box, but then decides to TYPE in another field's combo box, I want the combo box they typed in to do two things: 1) filter the records for that field based on what they typed, if any records meet that criteria (e.g. they typed "B" so only records beginning with B are shown), and 2) if no records match the typed criteria, the search starts all over (at the top of the cascade), filtering all library records based only on what they typed in the most recent combo box.
Does that make sense? Any tips welcomed.
I don't know how to cascade combo boxes in this way.
Hi. I have a form (frmdetails) to store job details and another form (frmMaterials) to add materials to each job. They are both linked via a field Project_No
I have a query (QryTotal)that when run will list the materials used for each project, that is all OK.
What I am tryng to do, is add a text box to frmdetails, that will just tell me how many materials have been booked against each job. Just a running total that will tell me that for project number 100000, 4 items have been booked.
I have tried using subforms (using =count(*) ) but this doesn't seem to be working. I also added =Count(QryTotal!Material) to a text box but this doesn't work.
I have a survey database that I've been using for the last year for monthly auditing of employees files. I need to be able to get monthly audit scores for each employee but grouped by their manager. The problem I'm having is employees have moved between managers throughout the year, so employees that are listed under Manager 2 now were actually working for Manager 1 when the audits occurred.
ie. Audits occurred Jan - April for Employee 1 while they were assigned to Manager 1. Employee 1 moved to Manager 2s team in May. So when running monthly reports for the year Employee 1 audits should fall under Manager 1 for Jan-April and Manager 2 for May-Dec.
I do have a history table set up like: tblEmployeeHistory ID (PK) EmployeeID (FK to Employee table) ManagerID (FK to Manager table) MoveDate (date employee assigned to manager)
The Employee table is set up like: Employee ID (PK) EmployeeName ManagerID (FK to Manager table)
The Manager table has the ManagerID and ManagerName.
That's the employee side of things; then I have the tables that store the audit results:
tblAudit AuditID FileNumber AuditDate EmployeeID (FK to employee table)
tblAuditResults AuditID; QstnID (Composite PK, QstnID is FK to tblQuestions) Answer
How can I use AuditDate and MoveDate to relate audits to the managers the employees were under when the audits occurred?
Hey all, i just would like to know if there is a way to have a fixed number of records in a query. Let's say, example (a), a query returns 2 records (qry1); i would like to have my query (qry2) to have 5 records, so the first two records will appear and then 3 blank records. (b) A query (qry1) returns 4 records, then this query(qry2) should return the 4 records plus a blank record
Why do i want to do this? Because i want my report to show 5 records so when i print it i have those blank spaces to fill if necessary.
I want to have this: ______ lrecord1l lrecord2l l______l l______l l______l
Instead of: ______ lrecord1l lrecord2l
What im doing now is creating a temporary table and add the records to it plus blank records. What i used to do was add blank records in the same table meting the criteria of the report, so they will appear. After close the report, those records would be deleted.
I would like to know if theres another way, like a command in sql, or maybe some property on the report. What ever is most efficient and a good database practice. Thanks in advance
I have table when I open it I found total number of records 1000 while I get result through query I found that 2 records or more than present in the Table mean in query number of record is 1002. I donot understand why these tow records are not seen in the actual table. and these are not deleted by delete record qurey. While I can see it in select command.
I have a stock record database which I have 'inherited' from someone far cleverer than me! I'm fairly used to basic SQL, but I'm teating by hair out over this particular problem.
I'm writing an Update Query to count the number of [NewModelCode] records WHERE Status ='Available' AND StockType = 'New' AND InstStockReference.OnlineShop = Yes and update a field called CountNew on a table called InstStockReference.. So far I have the following SQL:
UPDATE InstrumentStock INNER JOIN InstStockReference ON InstrumentStock.NewModelCode = InstStockReference.NewModelCode SET InstStockReference.CountNew = DCount("NewModelCode","InstrumentStock","Status='Available'") WHERE (((InstrumentStock.Status)="Available") AND ((InstrumentStock.StockType)="New") AND ((InstStockReference.OnlineShop)=Yes));
It partly works, but the result I get is a column count of 939 in every field where the Status ='Available' AND StockType = 'New' AND InstStockReference.OnlineShop = Yes.
I want to do a count the number of [NewModelCode] records.
Is there any option to count the number or records relating to a specific field. Here is the details..The db is for a school and there is a tables for class and students. I am using a form to enter students details. I had created a relationship with these two tables. i am using a query to get the details regarding a specific class like classname, class teacher like that.. Is there any way to calculate the number of students in that specific class.
now i am using the query as follows
SELECT Class.* FROM Class WHERE (((Class.ClassID)=[Forms]![Class]![ClassID]));
I had created the relationship with the above two tables with classid as the primary key
Hello all. I need some help calculating the total number of records returned in a query anytime i run the query.
I have a form that creates an SQL statement and changes the querydef at runtime and displays the results in a listbox. I want to include on my form a percentage of the total records from the table based on the records returned in the query Ex. (5/10) so I can use this information on a report.
What I am trying to ultimately acheive is to calculate an attrition rate based on the number of (clients that leave in a given period / total new clients added in the given period )
I have a form based on a query. I've disabled "Navigation Buttons" on the form and am trying to recreate their functionality in a little more user friendly way. I've created next / previous record buttons and have those working great.
I'm now trying to re-create the record counter / tracker. I'd like to setup a box that shows which record I'm on (this can simply be based on the order the query returns them, the same way the navigation buttons does it when they are enabled. ), and how many records there are total in the query.
I tried messing around a little bit with =DCount but wasn't able to make it work I suspect because I'm counting the number of records returned in a query, not in a table.
I have a date field in a table. I wish to display in a query:Column A representing the month. Column B representing the number of records in the table corresponding to that month.
I have been tasked to create a DB for my unit. I have created a few DB, but I am a novice at best. I need a crosstab Query to count the number of records for each FY. The Army's FY is from Oct -Sep. I only need to show the the total number of record for the previous FY in a Report and on a form.
I use an append query to insert this new record into the table EVENTS_MAIN.
I wish to set the start time and end time for all event days in hours and minutes. I will use these entries for displaying start time and end time for each event days, to calculate daily total hours and event total hours later on.
Therefore, I wish to create a query that will display event date 1, event date 2 and event date 3, based on the number of the EVENT_total_days field, so I can set the start time and end time for each day separately.
Is it possible to "convert" or "switch" the number of the days into number of records? Can a query convert a field value into number of records?
I have two tables, identical in terms of structure (number & names of fields etc.) but different in terms of content (records not necessarily the same, some may be common to both, some may only be present in one or other table)
I want to set up a query to count the number of records which are present in one table (Table A) but not in the other (Table B) using a common identifier field, and put the numerical result in a text box on a form (i.e. use the query as the control source for the text box)
I've managed to come up with the following which provides the list of ID's :
Quote:
SELECT tblA.CommentId FROM tblA LEFT JOIN tblB ON tblA.Id = tblB.Id WHERE tblB.Id Is Null;
Which will come in useful elsewhere but how do I adjust this SQL to only return the number of records? I think I have to use COUNT(*) somehow but I'm not familiar with it and not sure of the syntax?