Queries :: Incentive Calculator - Creating X Amount Of Rows In Append

May 12, 2015

I am trying to build an incentive calculator for my company. I need a query that will take, for each employee,

Append rows as follows:

Emp1 | Attendance |
Emp1 | CSAT Score |
Emp1 | Quality Score |
Emp2 | Attendance |
Emp2 | CSAT Score |
Emp2 | Quality Score |
...etc...

The Attendance, CSAT Score, Quality Score are from a table named PARAMETERS where each department will have them listed as

Dept1 | Attendance | >90% |$10
Dept1 | CSAT Score | >8.0 |$10
Dept1 | Quality Score | >3.5 |$20
Dept2 | Attendance | >95% |$15
...etc...

I can do the lookups needed to find out which department an employee belongs to, but how to get the Employee to be listed in multiple rows like this.

View Replies


ADVERTISEMENT

Queries :: Append Query Returning Too Many Rows

Nov 14, 2013

I want an append query to create a new record in a table and populate that record with fields from a form. Some of these fields are free text, others are from combo boxes.The append query adds vastly too many records (albeit all populated with precisely the same information) - and the number it adds seems to depend on which combo box options I choose.

I have a similar append query which pulls information from earlier records in the table, and combines that with free text and combo boxes on a near-identical form, which works fine and always just adds one row.

View 10 Replies View Related

Queries :: Multiple Rows Into 1 And Creating New Columns?

Nov 26, 2014

I have a query which is used to pull data from 2 tables.

1. Only show the records that have 2 or more same Pat#, FName and LName. If it is a single record I would like to hide it.

2. Need to see the different dates amd know the difference.

Currently Query Looks like this.

Pat# FName LName Reason Status Date
00001 John Doe 1 1 11/13/2014 00002 Sally Doe 2 1 11/25/2014
00003 Bill Bates 1 1 11/04/2014
00003 Bill Bates 2 1 11/07/2014
00004 Jenny West 1 1 04/03/2014
00004 Jenny West 2 1 04/10/2014

The Signup reason number 1 represents the signup date and number 2 represents the time they left. SignupStatus number 1 represents a group.

So I am hoping my end goal it would look something like this.

Pat# FName LName Date 1 Date 2 Difference
00003 Bill Bates 11/04/2014 11/07/2014 3 Days
00004 Jenny West 04/03/2014 04/10/2014 7 days

I am trying to avoid using VBA or SQL. I do not know where to input it.

I tried to use the “Find Duplicates” query wizard but this did not work because it finds duplicates like last name first name, but it does not separate the dates.

View 5 Replies View Related

How To Append Multiple Rows Using Append Qry?

Jan 2, 2008

Im trying to improve my appl. but Im stuck trying to figure out how to append multiple rows on a table using the Append query.

My problem comes since I have 4 tables with the following fields:
1) Orders
OrderID (number)
CustomerID (number)
Date (date)
etc...
2) OrderDetails
OrderDetailID (number)
OrderID (number)
ProductID (number)
QuantitySold
UnitPrice
etc...
3) TmpOrders
OrderTmpID (Autonumber)
CustomerID (number)
Date
etc...
4) TmpOrderDetails
OrderDetailTmpID (Autonumber)
OrderID (number)
ProductID
QuantitySold
etc...

The problem comes since the Tmp tables are used just to record temporarly the information before the transaction is completed.
Whe the salesman at the desk finish the sale, a command button is presseed and an append query runs to transfer the data from Tmp tables to the Definitive tables. Another query (Delete) is excuuted inmediately after the append qry. and it deletes the information recorded on Tmp tables.

I need to reset the autonumber or create a field that records the line number so I can add up to the Maximum OrderDetailID found on the definitive table, but the problem is how to create the "controlled" autonumber.

Please help.

View 1 Replies View Related

Delete All Rows Then Append

Oct 24, 2006

I need to append some rows into a table, before I add these rows i need to delete all of the old rows.

I can't use a Make Table query because I am updating a linked table in another database.

So how can I (automatically) delete all rows in that table before or during the append process.

Thanks
Steve

View 2 Replies View Related

Error You Are About To Append 0 Rows

Sep 24, 2005

Hello,
I have an append query attached to a text box called client on a form, and every time I enter data into this text box and click the next text box last name I get this error from microsoft office Access that says
(You are about to append 0 rows)
(Are you sure you want to append selected rows?) I click yes and every thing to work fine. I just wish this error message would go away.

I'm using Access 2003.

Thanks--Any Suggestions would be very appreciated.

View 1 Replies View Related

Append Without Duplicate Rows?

Oct 22, 2006

I need to append time log to time_log table. I could append table without errors.
But if I append the second time it duplicates. I cannot index Employee ID & Date coz there will be multiple entries.

Employee_ID, Date, IN, OUT

I need an append query which doesnt duplicate rows.

View 3 Replies View Related

Trying To Append Rows With VBA - Get Key Violation

Mar 9, 2008

Hey all. I'm trying to append rows to my database with some VBA code.

The code looks like this:
vInsertLoanSQL = "INSERT INTO Loan(BookID, MemberID, StaffID, BorrowingDate, ReturnDate) VALUES (" & vBook & "," & vMember & "," & vStaff & ", #" & Format(Date, "dd/mm/yyyy") & "# , #" & Format(vDueDate, "dd/mm/yyyy") & "#)"

DoCmd.RunSQL(vInsertLoanSQL)


The variables are all filled out.

The table that it's being inserted into, Loan, has an Autonumber primary key (not included in the INSERT script) and a number of other fields that have no zero-length restrictions, no "Required" fields set to Yes and no Indexes. The table in question is also completely empty, there are no rows (they have all been deleted) - so I have no idea why I'm getting that "Microsoft can't append all the rows in the append query" error. It says its a key violation but I really can't see how its possible.

Anyone out there know whats going on?

View 5 Replies View Related

Modules & VBA :: Adding Amount And Checking Daily In Hand Amount?

Jul 21, 2015

I have One table(and designed form from it) in which i have recording the daily transactions(it is like a daily book). Daily transactions took place like Purchase of items of Amount 45, sale=70, sold on account=100 etc.

What problem i am facing is: I would like to Add Cash In Hand amount and would like to show it on my form. When day end I would like to move remaining cash In Hand on separate column of that date. The next day i would like to take the previous Remaining Cash in Hand as Cash In Hand at Start for next date and so on.

View 2 Replies View Related

Pop Up A Calculator

Jul 19, 2006

Is it possible for me to have a Query that pulls up the information I need and then it automatically starts up the windows calculator?

IE: information comes up then the calculator pops up so you can do calculations based on the information being shown.

View 3 Replies View Related

General :: Multiply Different Amount Of Hours By Different Amount Of Rates

Jul 17, 2014

I am trying to make a report in which I can see the amount of money that I have to pay weekly to an employee. To explain myself clearer, I have different rates for each employee. For example:

NameNormalPayRateVacationPayRateSickPayRateOvertimePayRateStandbyPayRate
John Smith$15$10$15$30$8
Ken Jonson$10$8$10$20$8

I am doing this in a query. So what I want to be able to do is, for example, take 4 hours that the employee worked at NormalPayRate and multiply it. But if tomorrow the employee worked at a different rate, for example 3 hours overtime, I want those 3 hours multiplied by OvertimePayRate.

The way I saw it on my Google researches, is that they have only one rate and the amount will be [SumOfHours]*[Rate]. But how can I tell my query to skip, for example, one rate because the employee didn't work at that rate that day. So I can have different amount for the different rates.

By the way, entering the information I can divide at what rate the employee worked x day. So if the employee work 6 hours at regular, and later on 4 hours at standby, I have those information separated in my table.

Results that I am getting: I can easily get the amount in money multiplying the whole hours by a rate, so my result in my report will be multiplied by the same rate.

I am using Access 2013 ...

View 2 Replies View Related

Budget Calculator

Jul 1, 2005

I have a table that a created to calculate a running balance.

Fields look like this.

Desc = Text - Description of transaction
Type = Text - Combo Box Debit or Credit on Form
Amount = Currency - Obvious
Date = Date/Time - Obvious

I have two questions. In my form I have the combo box for debit/credit. I want to have the amount field to be either negative or positive depending upon what is selected for the type field.

Secondly, I would like to create a running amount. I have a field in my form for the amount. How would I link it up to create an amount.

Thanks

View 1 Replies View Related

Creating Rows In Multiple Tables

Nov 3, 2004

Hello:

I'm new to Access but not SQL, and am having difficulty coming up with a solution to the following problem:

I have one table for all Strings used in all other tables (to make Internationalization easier). The fields are: zId, zType, and zString. zId is an AutoNumber field. zType is a number which defines what type of string it is ( Item Name, Person Name, etc. ). zString is a text field with the actual text string (can be empty).

I have another table for Items, which have (among other things) Names (field name= zName). zName is actually a lookup into the Strings table and stores just the ID.

I want to create a form for people to enter a new Item. When creating a new item using this form, they will have to give it a Name, which will need to add a new entry into the Strings table with the appropriate type (ie, Item Name).

So, my question is "How to do the following..."
* on my form to enter Item Data, when a user goes to create a new Item, I must first create a new entry in the Strings table with the correct value for zType. Then, I must get the value for zId for this new entry and assign it to the zName field in the Items table for the new record that I am creating.


Any help is appreciated.

_C

View 2 Replies View Related

Modules & VBA :: Shell Function To Open Calculator

Dec 17, 2014

I want to open the Calculator by clicking a command button (using the On Click event).

I have tried the code below but can't get it working. What do I need to change?

Private Sub Command7_Click()
Dim RetVal As Integer
RetVal = Shell("C:Windowscalc.exe", 1)
End Sub

View 2 Replies View Related

Queries :: Sum The Amount For Each Date

Jun 19, 2015

I have a qry which gives me this data:

date/code/hrs/amount
12/05/15 ABC 4 243.55
12/5/15 DEF 6 707.12
13/05/15 ABC 1 101.01
etc..

I'd like to sum the amount for each date. Is this possible?

I will be updating the table with new dates and want to eventually create a form where i set the dates and it does the query where I get the amount for the dates specified, e.g. 01/07/20 - 08/07/20

View 1 Replies View Related

Queries :: Adding Amount For Each ID Per Month

Sep 16, 2013

I've got a table with a lot of data.

In the table is a SAP Number (ID), a booking date (BuchDatum) and an amount (Betrag)

Now i want to sum up, for each ID the amount in one months.

In the end i want to have a table like this

Date SAP Number Amount
01/2011 12345 1000€
02/2011 12345 0€
03/2011 12345 100€
04/2011 12345 300€

and so on.

So for each ID, a table like this.

I tried it already, but my Problem is that i either sum up the years or the months. I Need a combination.

I put the file in the Appendix.

View 1 Replies View Related

Queries :: Total Amount Paid Between Two Dates

Mar 18, 2014

I've got to do the following query in Access:

"This query should prompt the user to enter two dates and than calculate the total amount paid for all invoices in the Amount field between those two dates (inclusive)."

Query is based on table Invoices.

I have created the query and dates part works fine. However,when I run Sum for the Amount field, instead of total amount query displays amount of each invoice between those dates. How to get just Total (amount of each invoice added up)?

View 3 Replies View Related

Creating A Form To Append A Table With Values From Other Tables

Oct 12, 2006

Hi,

I have built an Access DB containing 3 tables: dimensions, time, companies. The tables are not linked and are to be used to look up values for the new form. The goal is to create an Access form that would allow the user to select distinct values from all 3 tables, enter some own data and then execute an append query to add the record to the main table.

Something like this:

Initially I have 3 tables:

Prepopulated Dimensions table with fields:
dimension
....

Prepopulated Time table with fields:
Date
Day
Month
Year

Prepopulated Companies table with fields:
Company
....


My form is to be able to select distinct values (combobox) from all three fields:
Company
Dimension
Day
Month
Year
Value (data entered by user)

The record then is appended to the Main table containing:
Company
Dimension
Day
Month
Year
Value (data entered by user)

Thanks a lot for your time and help!
Polar

View 3 Replies View Related

Queries :: Count The Amount Of Times A Name Appears In A Query?

May 31, 2013

I have a log in table that counts every time a user logs onto the database. Each time a user logs in it adds another entry to a table.

I have built a query to display the user name and date of log in so I could display this information in a report. The report is now getting rather long, and I am looking for a way to display each users name and have the total number of times they have logged in, not display each time they have logged in separately.

The Query has two fields "Agent Name" and "Logger Date"

The report displays the data as follows

Agent Name Logger Date
User 1 26/5/13
User 1 26/5/13
User 1 27/5/13
User 2 28/5/13

What I would like to do is have a report listing each users name, with a column showing how many times they have logged on. e.g.

User Name Login Count
User 1 3
User 2 1

View 10 Replies View Related

Queries :: Adding Up Times To Get Total Amount Of Hours

Dec 5, 2014

I have a table of hours that have been worked by employees for each day of the week

[moh] (Monday's hours),[tuh],[weh],[thh],[frh],[sah],[suh]
data eg (this is how I would like it to be inputted into the table)
7:24:00,7:24:00,7:24:00,7:24:00,7:22:00,0:00:00,0: 00:00

This equates to 36:58:00

I have tried

Total Hours: [moh]+[tuh]+[weh]+[thh]+[frh]+[sah]+[suh]

but I am struggling to get what I want in the right format.

How to record the initial data or a formula to format the end result.

Excel just does it !!!!!

View 1 Replies View Related

Queries :: Count Same And Differences / Calculate Percentage Of Number Of Same Over Total Amount

Jul 9, 2013

I am trying to count how many of the "same" and "differences", as well as calculate the percentages of the number of "same" over the total amount. To clarify, I work at a nursing home, and I need to calculate the number of people who were admitted to our facility and then to the hospital for the same diagnosis, and a different diagnosis. Then, out of the total number of people who were admitted to the hospital from our facility, I need to calculate how many of those people had the same diagnosis or a different diagnosis.

Also, I need to categorize these diagnosis by each type of diagnosis.

View 14 Replies View Related

Queries :: Count Amount Of Records That Fall In Each Month In Date Complete Field

Sep 13, 2013

i''m currently trying to count the amount of records that fall in each month in the date complete field. i am currently using a count query and it it bringing up the dates not the month.

View 1 Replies View Related

Hide "Do You Want To Append X Rows" Statement

Jun 27, 2007

I have made an own copy button that make a copy of current order to a new order and also copys all it data. I am using INSERT INTO but I get "Do you want to append " box all the time. Is there someway to allways make answer yes or block it out so it doesnt show up?

View 3 Replies View Related

Forms :: Creating New Rows For Data Entry In Access Forms

Dec 26, 2014

I am creating a simple data entry form wherein the user will enter the product id and on change the product description and retail price must be displayed.

When the order quantity is entered, the total cost need to be calculated. I am able to do this using DLookUp and simple multiplication.

However, after doing the above, I need another row to appear so that I can accomplish the same for another product.

View 2 Replies View Related

Is There A Limit To The Amount Of Queries Used To Create A "Super" Query?

Apr 14, 2005

I have a number of smaller queries that I want to join together to create a super query to display on a report. It works fine when I have a dozen queries joined, but as soon as I add any more, the query takes at least 10 minutes to run (although it eventually works). Is there a limit to the number of queries I can include in a query or is there some other underlying problem?
NOTE : the smaller queries only contain half a dozen records with totals.

Any ideas?

View 5 Replies View Related

Queries :: Sum Different Rows

May 3, 2013

I'm building a Bradford Scoring DB, everything is running smoothly apart from one niggle I would really like to get around and automate.Essentially, I'm hoping to run a difference sum query which is fine when it's on the same row, but the issue I'm having is that I'm trying to calculate this from another row, linked by name. This inturn will workout the difference between the two absence episodes i.e. it's been 80 days since their last absence end.

I did find a method which would view the previous AutoID, but this worked well for the whole table, but not within a query limited to name.The obvious workaround is to allow the team leaders to enter this manually, but this could be a/ open to small errors b/ mildly time consumingI, like most, work with people who want info NOW and with little effort.

View 4 Replies View Related







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