Performing Calculations In Reports
Nov 13, 2005
I have a table customers and Purchases. Customer table has the {name, lastname, tele, address, city ..etc.} and the Purchases table has the {name, sku, unitprice, qty, cost}
Is there a way to create a report that shows the total amount of purchases made by customer?
Also is there a way to round up values in reports such that if the value is 3.95 it says 4.00?
please let me know if more info is required.
View Replies
ADVERTISEMENT
Nov 8, 2004
Hi,
My boss wants me to program in visual basic, instead of using queries, a calculation between times, which values are gotten from a table. How do I perform a calculation between two fields from a table in code and what functions are there to calculate the amount of difference in minutes between times in visual basic? THANK YOU SO MUCH IN ADVANCE!
G
View 3 Replies
View Related
Apr 4, 2013
I am entering tax information that requires calculations into a form.
The calculations are visible and perfect on the form but do not appear in the table for printing.
A - should the calculations be created for each field in the report
B - should the calculations be entered into a Form/Query
View 3 Replies
View Related
Jun 15, 2004
I have come across this problem several times. I have sub reports on a report and calculations are done using the data in the sub report. In many instances the subreport is empty. The calculated fields read #error. (otherwise the report runs well and records with data calculate fine) I would like to hide these errors and associated labels when the subreport is empty. Everything I have tried either does nothing (error still appears in text box - but runs ok otherwise) or I get a runtime error since it is trying to access "nothing" in the sub report.
How can I catch and therefore react on this empty sub report. (or subform too)
Thanks
Lisa
View 13 Replies
View Related
Sep 28, 2015
I have solved the problems getting values on the subform. I have not in getting values on the subform.For instance, on the one titled phone use the formula in the tutorial is:
=[sbfCustomerRoomUse].[Form]![txtTotalPhoneUse]
#Error results when the doc is put into a form mode.
Now when I input each value in the equation above separately.I still get no entry.
For " = sbfCustomerRoomUse" , I get #Error;
and for "= txtTotalPhoneUse", I get #Name.
CustomerRoomUse and txtTotalPhoneuse are from the subform that was dropped into the customer form in a previous step. It shows that explicitly when designed sbfCustomerRoomUse on the main that CustomerRoomUse come from a subform. This does not seem to need to be done with txtTotalPhoneuse, and I am not sure why. Neither one gives me a desired calculation result.
View 14 Replies
View Related
Sep 28, 2007
I have this table with this information...TABLE1code.............Name............Amount.....type'1000000'........'Name1'........... 0.00.....'N''1010000'........'Name2'........... 0.00.....'N''1010100'........'Name3'........... 10.00......'S''1010200'........'Name4'........... 5.00......'S''1010300'........'Name5'........... 0.00......'N''1010301'........'Name6'........... 1.00......'S''2000000'........'Name7'........... 0.00......'N''2010000'........'Name8'........... 0.00......'N''2010100'........'Name9'.......... 6.00......'S''2020000'........'Name10'......... 0.00......'N''2020100'........'Name11'.......... 3.00......'S'A need to create consult whose result show like this:RESULT'1000000'.....16.00'1010000'.....15.00'1010300'..... 1.00'2000000'......9.00'2020000'......3.00Could somebody help me this problem?. Thanks
View 3 Replies
View Related
Dec 14, 2006
This is going to be a simple one for someone, but it is proving to be a pain for me. I have two collums in a table, one that is a value another is a quantity, i have another field that totals the two fields. This works fine and shows the total but it does not store the total into the database, how can i get it to do this.
In the Total field the control source is "=[Cost]*[Quantity]" i have tried to set it too TotalCost=[Cost]*[Quantity] but this gives me errors
Thanks for looking
View 3 Replies
View Related
Oct 25, 2006
Hi,
I recently got a new job and am trying to learn access for it. I have two tables. Both of them have client id numbers. They are both supposed to have the same client id numbers. However, Table 1 has more client id numbers than Table 2. I want to do a match query that selects the client id numbers in Table 1 that do not have a corresponding match in Table 2. How would I go about doing this?
Also, I want to do a simple select query where I select the client id numbers in Table 1 whose first two numbers are "88." How would I do this in the query or SQL form.
Do you have any recommendations about the best way to learn Access for practical applications like this? I'll also need to get good at making Forms which seem fairly complicated.
Thank you for your time.
Rajiv
View 1 Replies
View Related
Sep 3, 2015
now when I try the section performing data entry with SQL, I am at the point where I have typed the SQL statement:
INSERT INTO Employees(EmployeeNumber, [Last Name], Gender, HourlySalary)
VALUES ('227947','Jameson','M',18.85);
It chokes on the "unknown variable" HourlySalary, I could find nothing wrong with it.I then deleted my HourlySalary and copied theirs directly from the tutorial. It still chokes on HourlySalary.Now I am not sure what to do since I have taken their script and copied it to the SQL window.
View 4 Replies
View Related
Aug 8, 2015
I have a form frmMember, it has a search button that performs a complex search of fields. after performing my search my [BaseDues] field shows #Name? BaseDues is set by a CBO in the field above.
It works correctly except after the search...
Here is the Code for the Search Button:
Private Sub cmdSearchForm_Click()
On Error GoTo Err_cmdSearchForm_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearch"
[Code] .....
View 9 Replies
View Related
Jul 11, 2012
I am writing an application for my personal use. I have 2 Access databases, one contains the data tables and the other has the forms, queries, reports, etc.
So far, I have been able to use the queries in the Row Source property of my form objects to accomplish what I want to do. Now I want to have a button that appends records to a table, the data in the table comes from several different controls on my form. After doing this the button should requery another control to display the new records added.
The OnClick event for the button allows me to use a Macro builder, Expression builder or Code builder. If I choose to use DAO in VBA code to append the records, do I have to define the database to create a database object to use even though the database is already open? Can I use a Macro to do this? Can a macro reference the data that is in the controls on my form?
View 6 Replies
View Related
Nov 16, 2014
I am trying to perform some keyword searches of a text field. My preferred option would be to hold all the keywords in a separate table and then use something like
SELECT * FROM Text Table, Keywords Table WHERE (((InStr[Text Table].[Text],[Keywords Table].[keywords])) > 0 ));
This works and returns anything which has the string from the keyword table, however I wanted to look for whole words only. I can do this in SQL using a regular expression along the lines of [!a-z] keyword [!a-z] which only finds the string where it has no letters directly either side of it.
What I would like to do is combine the two methods so I hold my keywords in a table and then use them with the reg ex to find whole words only.
View 6 Replies
View Related
Oct 10, 2014
how to do anything with it outside of tables and queries. I have been tasked with creating a form to do fairly basic things. Via tutorials I have managed to use the Expression Builder to do virtually everything I need except one thing.
I need to pull a value from row 2 in a specific column from a subform and subtract it from row 1 in the same column and subform leaving behind a + or - number for the user. Similarly, I need to do the same but subtracting the LAST ROW from row 1. If there is only one row at the time the operation is being performed, a value of No Data needs to be returned instead of a number.
View 2 Replies
View Related
Jun 8, 2005
I have an odd problem that has stumped me for several days. I'm working on a form that contains a chart. The chart is based on a query, which is based on another query, which is based on a table. In the top query, I need to put some calculated fields that operate on other fields. But when I try to multiply two fields together, I get Null. I'm pretty confident that the fields I'm operating on are numerical.
The fields of the query should be:
MaxOfEverInSchool
MaxOfSurvivalToGrade
MaxOfEverInSchool
With these being the calculated fields:
MaxOfSurvivalToGradeCum: MaxOfEverInSchool*MaxOfSurvivalToGrade/100
MaxOfCanReadCum: MaxOfEverInSchool*MaxOfSurvivalToGrade*MaxOfCanRea dCum/10000
Any insight would be greatly appreciated--I just can't understand why Access would suddenly refuse to do math.
View 1 Replies
View Related
May 3, 2005
Hi ive made a query but instead of calculating the total at the end of each line I want it to add up the total quantity at the end.
For example:
ID Description Quantity
ID Description Quantity
ID Description Quantity
ID Description Quantity
ID Description Quantity
How do i get the query to add up all of those quantities?
View 5 Replies
View Related
Oct 30, 2005
I'm hoping this is a no brainer...I am a complete newbie and self taught so apologies for not knowing the correct techie terms!!
I have a db with products...
Each product has a price (to customer) and cost (to me the seller)
What I want to work out is the margin i.e. price minus cost divided by proce multiplied by 100 to give a margin in percentage terms.
The data is held in a table with a record per product with the price and cost..
I want to build in another fieled per record that calculates the margin...
Thanks very much
Jessica
(I would also like to be able to work out decreasing margins if I was to extend say a 10% or 20% discount to the customer but I guess I shoudl walk before I run!!)
View 3 Replies
View Related
Nov 15, 2005
Hi, I have a database and on one table I have dates stored for certain jobs. I was wondering if anyone knew how to automatically calculate an end date if the start date and duration is entered!
Do I use a certain query?
Hope you can help, Tobi :)
View 2 Replies
View Related
Jul 26, 2006
Hello all,
I'm after some advice. Access is not one of my strong points (even though I use it alot in work!)
Anyway, is it possible to create calculations in access similar to those in excel????
View 2 Replies
View Related
Mar 18, 2008
Ok I'm really new at using access so go easy on me. I am trying to write a database to keep 30 measurements of a part grouped by lot number and then calculate the standard deviation, mean and a few other calculations, however I am unsure about how to do the calculations in access.
I would like the database operator to be able to enter the data then print out a report per lot, with the entries and the calculated answers.
I'm just unsure where and how to do the calculations... any help or suggestions?
Thanks in advance!
View 14 Replies
View Related
Mar 30, 2007
Hi,
I've read plenty of advice warning against performing calculations in tables. What is the best way for me to achieve this.
I need to calculate the product of a number of fields.
Field1 * Field2 * Field3 * Field 4 = Value
Field1 and Field 2 change periodically
Field3 and Field4 change less frequently
I want to be able to perform filter queries using the resulting value
i.e return all items with a value greater than 100
Thanks in advance.
Al
View 2 Replies
View Related
Apr 13, 2008
I'm having a problem with this age formula in the query :
AGE: DateDiff("yyyy",[birth_date],Date()) & " " & " years" & " " & "and" & " " & DateDiff("m",[birth_date],Date()) Mod 12 & " " & "months"
Need your help guys in 2 probs :
1. age calculated is not right.
2. need to compute what w'd be age on the sep 1st 2008 - how do I do it?
Appreciate your help.
Thanks.
View 2 Replies
View Related
Apr 26, 2005
Hi,
I'm trying to a create a report to list results for a running club based on series-to-date. To do this, I allocate points to the first 100 runners to cross the line in each race. The winner gets 100, second place 99, and so on with the 100th person getting 1.
In the database i have 1 table holding member details, then one table holding races. I also have a table linking the 2 called race_entry so i know what members have entered for which races. I have one other table called race_result that links the runner to a race and holds the position they finished in the race.
How could i use the data in the race results table to add up all the points they earned by looking at their finishing position in the races they run and then listing the points in order in a report.
I assumed it wouldnt be necessary to have a point field in the table as its deriveable.
Any help urgently needed!!!
View 1 Replies
View Related
Jul 13, 2006
This is more than likely simple for a lot of people out there but it has me stumped. I have a form that has a two combo boxes with dates in both ( so the user to pick from and to dates) now I am always going to be adding more dates as time progresses. I need the next form to add the info with the dates no mater what the user picks.
For example I am going to (once a week) be adding new info to the table.The end user is going to pick 06/24 (to indicate the end of the week) in both forms or 06/24 in the from box and 07/01 in the to box. In all situations I need the next form to add the data together.
Sorry for the long post but didn't know how to state it any simpler.
View 10 Replies
View Related
Dec 6, 2007
Hi everyone!
I am a beginner with Access and was wondering if someone would be so kind to give me some pointers
I have created a form where the user can select which dates they require a hotel for the evening. I was looking for some advice on how I can go about putting an area on the same form which calculates a sub price for the days they have selected. If I am not being clear then ask for more details.
Thanks
View 2 Replies
View Related
Aug 24, 2005
I need to be able to use some functions available in excel in an access 2000 database. These include SUM and IF functions. If any one can help me figure out how to do this any help help wouold be greatly appreciated
View 6 Replies
View Related
Mar 7, 2006
Hi
I would like to manipulate some date information. I have a start date field and an end date field and I would like to draw up a schedule for payment where the Acess takes the finished date and the start date to get total days appart then devides this by a value set by the operator. say If the operator wanted 6 paymes then my total days would be devided by 6 giving me the number of days to add on to the start date. Then with these dates a schedule is made up and the code I have tried looks something like this.
Dim valuation1 As Date
Dim valuation2 As Date
Dim valuation3 As Date
Dim valuation4 As Date
Dim valuation5 As Date
Dim valuation6 As Date
Dim valuation7 As Date
Dim valuation8 As Date
Dim valuation9 As Date
Dim valuation10 As Date
Dim valuation11 As Date
Dim valuation12 As Date
Dim startdate As Double
Dim findate As Double
Dim valcounter As Double
'retrieve start date and end date
startdate = CDbl(Me.Start_Date)
findate = CDbl(Me.Completion_Date)
'calculate evaluation periods
Dim valCount As Double
Dim valDays As Double
valCount = CDbl(Me.Valuation)
valDays = (startdate + ((findate - startdate) / valCount))
'Work on entering valuation dates
Do While valcounter < valCount
Select Case valcounter
Case "1"
Me.valuation1 = startdate
Case "2"
Me.valuation2 = startdate
Case "3"
Me.valuation3 = startdate
Case "4"
Me.valuation4 = startdate
Case "5"
Me.valuation5 = startdate
Case "6"
Me.valuation6 = startdate
Case "7"
Me.valuation7 = startdate
Case "8"
Me.valuation8 = startdate
Case "9"
Me.valuation9 = startdate
Case "10"
Me.valuation10 = startdate
Case "11"
Me.valuation11 = startdate
Case "12"
Me.valuation12 = startdate
End Select
valcounter = valcounter + 1
startdate = startdate + valDays
Loop
' this value is to test the interval period
Me.tdays = valDays
I am new to vb and so ths code is not going to be the best or anywhere near but any help would be great.
Thanks
View 1 Replies
View Related