Round Up Woes
Jan 22, 2008
Hi,
I am running a query that has this function
MyRoundedValue: Round([Bonus Total],2)
I am trying to round up the value in Bonus Total.
Currently the result shows 5140.602 and I want it to round up and show 5140.61
Is this possible? For the life of me I cannot figure it out..
Thanks
Fen How
View Replies
ADVERTISEMENT
Apr 20, 2005
The database for workers works ok from a solitary table, tblEmployees.
I want to make it a relational db.
I’ve incorporated lookup tables. But I’m lost about what to do next – and if it should be divided further.
I’ve studied many tutorials in relationships, but I don’t find one that resembles this one.
Could a relationship expert give advice please? I've included a sample, hoping this will be simplest way for you to understand the challenge.
View 14 Replies
View Related
Sep 25, 2007
so, I have created a working SQL statement that summarises data from a bunch of different tables (it's a stock monitoring application so it all has to do with levels of stock, numbers of parts processed etc...):
SELECT tblPPIn.BatchID,
tblPartDescriptions.DrawingNumber AS [Drawing Number],
tblOrder.IssueNumber AS [Issue Number],
tblPartDescriptions.Description AS [Description],
tblPPIn.Qty AS [Total Booked In],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyProcessed) AS SumOfQtyProcessed FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',(SELECT Sum(tblPPProcessed.QtyProcessed) AS SumOfQtyProcessed FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)) AS [Total Qty Processed],
IIf(IsNull((SELECT Sum(tblPPOut.Qty) As sumofQtyOutPass FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'PASS';)),'0',(SELECT Sum(tblPPOut.Qty) As sumofQtyOutPass FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'PASS';)) AS [Total Good Parts Taken],
IIf(IsNull((SELECT Sum(tblPPOut.Qty) As sumofQtyOutUninspected FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'UNINSPECTED';)),'0',(SELECT Sum(tblPPOut.Qty) As sumofQtyOutUninspected FROM tblPPOut WHERE tblPPOut.BatchID = tblPPIn.BatchID AND tblPPOut.IQCPass = 'UNINSPECTED';)) AS [Total Uninspected Parts Taken],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyPass) AS SumOfQtyPass FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',(SELECT Sum(tblPPProcessed.QtyPass) AS SumOfQtyPass FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)) AS [Total Passes],
IIf(IsNull((SELECT Sum(tblPPProcessed.QtyFailEtching) + Sum(tblPPProcessed.QtyFailCutOut) + Sum(tblPPProcessed.QtyFailFlatness) + Sum(tblPPProcessed.QtyFailHandling) + Sum(tblPPProcessed.QtyFailOther) AS SumofFails FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;)),'0',((SELECT Sum(tblPPProcessed.QtyFailEtching) + Sum(tblPPProcessed.QtyFailCutOut) + Sum(tblPPProcessed.QtyFailFlatness) + Sum(tblPPProcessed.QtyFailHandling) + Sum(tblPPProcessed.QtyFailOther) AS SumofFails FROM tblPPProcessed WHERE tblPPProcessed.BatchID = tblPPIn.BatchID;))) AS [Total Fails],
[Total Booked In]-[Total Qty Processed]-[Total Uninspected Parts Taken] AS [Total Unprocessed Parts Remaining],
[Total Passes]-[Total Good Parts Taken] AS [Total Good Parts Remaining],
[Total Passes]/[Total Qty Processed] AS [Overall Yield]
FROM tblPPIn INNER JOIN (tblPartDescriptions INNER JOIN tblOrder ON tblPartDescriptions.DrawingNumber = tblOrder.DrawingNumber) ON tblPPIn.BatchID = tblOrder.BatchID
ORDER BY tblPPIn.BatchID ASC;
don't worry about the details, it works as it is above...
now I only want to display data for batches where there are some parts left, so I've tried adding the following WHERE clause:
WHERE ([Total Good Parts Remaining] + [Total Unprocessed Parts Remaining]) <> 0
should work fine, right?
nope, we get the (all too familiar) 'Enter parameter value: Total Good Parts Remaining' (and the same for 'Total Unprocessed Parts Remaining'), despite the fact I have used these aliases in the previous SQL with no problem...
Is there any way around this or do I have to create a big-ass WHERE statement complete with the subqueries I've already used previously?
This is seriously annoying me today... any help would be massively appreciated!
cheers,
Bogzla
View 7 Replies
View Related
Mar 9, 2005
I have a subform on my main form which I can access properties etc without error, but when I try to set the sourceobject property I get an error saying it can find the object '~sq_cfrmAction~sq_csubPlanetItems'
My form is called frmAction
The subform is called subPlanetItems
The code that errors is this;
Me.subPlanetItems.SourceObject = "qryInPlanetNotInWIMS"
The query runs fine so it is not that?
Help please
View 2 Replies
View Related
Jan 10, 2007
Hello!
I have a problem regarding using usernames and passwords to restrict access to certain tables/forms/reports etc....
I have read around the forum and various other websites but cant seem to get much relating to exactly what i am wanting to do.
I think i understand the way the access workgroup security works. But does this not just restrict users being able to view the database as read-only or with other certain rights like that? So, firstly would i be able to use this to restrict the database the way i want?
Or is there a way to create a table with names and passwords and create a form at the beginning where the user inputs their details and then according to the details gives/restricts access to parts of the database? Ideally i'd like the startup form to direct them to a different menu according to the user which gives them only the options they are allowed?
Seems a bit of a mouthfull and i sound like a complete newb but i been trying to figure this out all day!!
Thanks
View 2 Replies
View Related
Jan 11, 2007
Hi all,
I have been using Excel data in Access either by importing the sheet as a table or directly linking to the sheet with no problems in the past but today I cannot seem to get the data to import in the right way.
The column on the Excel sheet is mainly populated by numbers but some of the values have letters in them. When I discovered this I formatted the column as text and tried to directly link to the sheet but the datatype kept insisting it is number. I then decided to import the sheet as a table and although it comes in as Text instead of seeing the value A1030573 in comes in as 7.1e+009 and this goes for the values that are purely numbers.
Is this a known bug, does anyone have a solution to to this ?
Thanks in advance,
Mitch....
View 3 Replies
View Related
Mar 19, 2007
Here's a weird problem I've had develop in the past couple months, before I upgraded to 2007, and now since I upgraded to 2007.
I've had the same Access database since 1997, and just recently upgraded it to Access2007, but as I said the problem occurred before and after the changeover.
I have two servers at the office. Server #1 (where the database is located) has attached to it is a dot matrix printer, used for printing our 4 part invoices/packing lists. I have another server (#2) which has a laser printer attached to it. The laser printer on server #2 is the default printer for all computers in the office. I have a lot of reports in Access where the printer to be used is the default printer. I have a single report in Access where I specified in the page design and layout to use a specific printer - the dot matrix on server #1.
Both servers are always on. Both printers are always on. I can go for weeks and weeks with no issues in printing the invoices. Then suddenly I'll get a
"This document was previously formatted for the printer (printer name) on (server #1), but that printer isn't available. Do you want use the default printer (\server#2laser printer) ?
OK CANCEL SETUP... HELP
It worked fine for 9+ years, and now I am getting this error. No new computers in the last 2 years. No new printer installs in the last 2 years.
I've gone through, uninstalled the printer, reinstalled the printer, both on the server and remote machines, and now I can't even get the report to "remember" that I want it to always print to the dot printer.
Any ideas?
View 1 Replies
View Related
May 30, 2005
I have a table that has (to simplify things) two fields.
[Patient_No] [ID]
BA4206 1067404
BA4206 1067405
BG1013 1067545
BG1013 1067546
BG1013 1067547
BG1111 1078432
I want to be able to count the number entries where the Patient_No is the same and output the query like this:
[Patient_No] [ID] [COUNT]
BA4206 1067404 1
BA4206 1067405 2
BG1013 1067545 1
BG1013 1067546 2
BG1013 1067547 3
BG1111 1078432 1
Hopefully this is just a simple query but for some reason i cannot get it to work.
Any help is much appreciated.
Thanks in advance
View 7 Replies
View Related
Mar 16, 2006
Ok, here is my scenario.
I have several FE's each saving in their own BE. They are all the same but for different areas of our business. Each has around 20-30 users. I recently introduced another form into the FE that has linked tables to another different BE in another folder. Each FE out there with its own BE now has this form and all of the new forms save to the same (one) BE. Ok, got it?
Now, sure its possible to have them all together and I would anticipate someone suggesting this. Its split up to keep sizes down and performance up among other reasons.
In any event, here I am. All of the new form introductions went smoothly without a hitch. The last one however is causing trouble. On submit an e-mail is sent, the user is asked if they want to submit another form, and if yes a new record is created. If no the form is closed.
E-mails are always sent, no problem. The trouble is saving the record. All except one of the different FE's I have out there in different folders save the record into the table just fine. There is one though that does not do this. The mail is sent and the program behaves normally with no errors but the record is not saved. This does not happen to all users of this FE either. There are some users that work fine and the record is saved in the BE yet other users do not save the record. You can see the .ldb appear and disappear. Our IT dept has been through the permissions time and time again and tell me they are ok. The FE and main BE are in one folder while the BE that the new form talks to is in its own folder. Remember, this works fine for several other instances, its just the one that doesn’t save the record.
I did have a chance to see the permissions the other day and it seems a mess to me. They have users in individually, as they were set up initially and the same users are also in there in a group and maybe 2 groups. The permissions look a mess to me… they really do…. but that doesn’t necessarily mean they would not work and can be blamed. I have no control over this part and it drives me nuts!
What I have done...... copied a working FE from another area into the troubled folder. No good. I have removed the new form along with its linked tables and the record is saved. Put the form and linked tables back in and it stops saving again. The code compiles just fine. I have done compact and repairs.
Any thoughts or ideas out there??? If you need more info ask. I understand what I wrote but you might not LOL
View 8 Replies
View Related
Apr 29, 2005
I'm sure you've all seen this before - but, it's killing me. It's for a university project which is being demonstrated soon, and I can't get it working consistently!
When pages are loaded, I get the error -
Provider Error - 80004005, Unspecified Error /db/update_select.asp line 33 (line 33 is the connection to the database)
or
Internal Server Error 500 - Page cannot be displayed
And sometimes I get one about "Jet" "Threads", and ODBC stuff.
I'm guessing it's a driver problem, but I have no idea where to go from here! I'm running Windows 2000 Adv. Server, IIS 4 (I think) and my db is access 97 :O (I would have put a newer version on, but the CD-Rom is so old on the PC it won't take 700MB CDs! Argh.)
Any help would be greatly appreciated!
Ally
www.ally.nu
View 1 Replies
View Related
Mar 9, 2006
I have a pretty standard relationship set up, with the following tables:
Customers: A row/Cust ID for each customer
WorkOrders: each customer can have multiple work orders (linked to Customers by CustID, individual ID is WOID)
Jobs: each work order can have multiple job records attached (linked to WorkOrders by WOID, individual ID is JobID).
As far as I can tell, they're fine and all other forms etc work, updating no problem, referrential identity is enforced etc...
Problems: When I go to make a "job allocation" query for subsequent form, I select: Customers, Work Orders and Jobs table (I then filter by location, but
this problem remains unfiltered also). They link up fine. The query isn't nonsensical either - it lets me add new data. BUT instead of showing all the customers and work orders for the location due for the location, it will ONLY display the records that have details in the Jobs table (the lowest in the relationship chain). Basically, If the jobs sections are empty or "unattempted", then NO details AT ALL will show up in the query. Which is a problem, because I want to see ALL the "unattempted" jobs in the area to allocate them, including customer data and work order numbers. I also need to have the jobs table present, so I can allocate a job date, a contractor etc.
I'm not sure what to do. As far as I can see, the set up I have IS very standard tables/relationships-wise. I have to work it out, otherwise I'm going to have to revert to some kind of 'super-table' (like in our old system) - which I am at loathe to do - I don't want to merge Work Orders and Jobs because that means a lot more typing for me.
Would cascade update in the relationships do anything? (it is checked).
I've been away from Access for awhile and I'm just drawing a blank on this one. Any help greatly appreciated. Thank you.
View 2 Replies
View Related
Jun 21, 2006
So, basically my database has quite a number of lookup fields in tables as there is much repeated data, each one references to a seperate table with an autonumber field (ID) and a text field (Value)
Currently I have column one (ID) as the bound column in such cases, as this is what the guy who started me on access said to do, and it's fine until I try and export any query with such a field to Excel.
I have found, through experimentation, that setting the 2nd column (Value) as the bound column allows me to export the values rather than numbers, but I don't know if this is a sensible thing to do? (ie, I don't know what other unexpected effects this might have)
Any guidance here would be very welcome, thanks,
Bogzla
View 8 Replies
View Related
Mar 23, 2007
Hello,
I have a table exported from excel. I intially imported this in to access to form a list of due dates for services.
Every week I get and e mail with the updated version.
I am trying to figure out how to update the dates in the 1st table with the new weekly ones.
I can't get it to update. Also there may be the addition of new services as well.
Any tips would be grealty recieved.
Many thanks in advance.
View 2 Replies
View Related
Aug 12, 2006
Hi there.
I've attached my db in the hope someone can help my head scratching.
I have got a Sales summary table with several other related table. Most notably, a table with the items in the sale and one with the costs. Because each sale might contain many different items and many different costs, I thought seperate tables were the way to go.
All I'm trying to do is make another query that gets the total sales (That's adding each line item * quantity) - (Each cost line item*it's quantity) and then finally the margin made on the deal.
However, if there are no costs or sales involved in the sale the query ignores it. (Sounds odd, but some transactions might be cost free, and some may not involve any revenue - so I have to bear it in mind).
I tried the Nz function, but It's either not what I need or I'm doing it wrong.
How do I get this to work?
Many, many thanks!
View 2 Replies
View Related
Feb 22, 2005
What sum can I use to round down on a report
View 1 Replies
View Related
Dec 30, 2005
Hi,
Need a little help with rounding up. In A2K I have a form with a textbox that displays a security deposit. Security deposit is calculated by rounding the payment to the next $25 increment, hence a payment of 324.53 should have a security deposity of $325.00, but a payment of $325.01 should have a security deposit of $350.00. The code I am using for a datasource for txtSecurity deposit usually works correctly, but for this payment ($324.53) it rounds to $350.00. Here is the code..
=(([txtPayment]25)*25+[txtSecDepRndTo])
txtSecDepRndTo holds the $25 incremental value.
Incidentally, if the payment is $324.49 my code rounds the Security Deposit to $325.00 as it should.
Any help would be greatly appreciated.
View 3 Replies
View Related
Aug 23, 2005
I have a field within a table entitled "Name Display" This displays names in the format:
Surname,forename
I have used the following:
Full Name: Right([Name_Display],Len([Name_Display])-InStr([Name_Display]," ")) & " " & Left([Name_Display],InStr([Name_Display]," ")-1)
To rearrange so format is displayed as forename,surname
However my output with some fields appears as:
SARAH WAILES, with spaces inbetween.
Can anyone suggest a way of removing these spaces?
Thanks
View 1 Replies
View Related
Sep 22, 2005
In a query I have placed functions that work fine. Now I needed to round a currency number to the nearest $10. ex. 224.49 would be 220.00. I used round(xxxxxxx,-2). this gives me an error. positive 2 works fine. What's the deal? thanks for anyone who can help me. :)
View 3 Replies
View Related
Jan 6, 2006
Hi, I have this query and I would like to have the avg display with only 2 decimal points. This is my SQL and I think I have to use this code but I'm not sure.
FORMAT(CountOfStudent Attended,'.00')
If I ad this after the SELECT statement my query will not work. What am I doing wrong?
Thanks!
~D
This works
SELECT [Attendance for Avg].CRN, Avg([Attendance for Avg].[CountOfStudent Attended])
AS [AvgOfCountOfStudent Attended]
FROM [Attendance for Avg]
GROUP BY [Attendance for Avg].CRN;
View 3 Replies
View Related
Apr 17, 2006
I track reports in a database. I have a date field [Approval_Date] in the database table. I want to review the reports after they have been approved for 6 months to see if the actions fixed the problem, so I created a query based on the table and used the code "6-Month Review Date: [Approval_Date]+180". This works great except that our meetings are always on Wednesday. So, is there a way to modify my code so that it calculates the 6-Month Review Date as 180 days after the Approval_Date, but then rounds up to the next Wednesday?
I really appreciate the help.
Thanks,
Jim
View 9 Replies
View Related
Nov 8, 2007
Please help me with the round function. I want .5 to round to 1.
Here is an example of my data: (18+18+18+20)/4 = 18.5 rounds to 18. I want it to round to 19.
I used the following expression:
RoundACT Composite Score: Round((([Column1]+[Column2]+[Column3]+[Column4])/4),0)
Thank you.
View 6 Replies
View Related
Oct 4, 2006
I have values for example like, 0.03, 1.14, 1.28 I'd like to round them to the nearest tenth. So resulting values will be as follows:
0.03 = 0.00
1.14 = 1.10
1.28 = 1.30
How do i achieve this? What's the formula?
View 10 Replies
View Related
Sep 8, 2004
Hi
I've happily been working with my new switchboard only to find it tells me I am limited to 8 entries. How does one get round this - create switchboards which link to switchboards, different pages of switchboard...I've got a bit lost and would much aprreciate any advice.
Thanks
View 5 Replies
View Related
Nov 9, 2004
Yes i have a round fuction on one of my calulations as it was displaying 32.222229 instead of 32.3
so i did this.
im varSumXCPIC
varSumXCPIC=Round(RS("SumXCPIC"),2)
if (varSumXCPIC = "" or isnull(varSumXCPIC)) then
varSumXCPIC = "0.0"
end if
But now when i veiw the page with the value = 0.0 it give me Invalid use of Null: 'Round'
any help on how to get ride of that erro would be great. thanks
View 1 Replies
View Related
Aug 4, 2015
I have is rounding down dates in Access. I seem to be having trouble with the equation I built below:
Months Remaining: IIf(Date()<[Anniversary],Round(DateDiff("m",Date(),[Anniversary],Round(DateDiff("m",Date(),[Anniversary]+12)))))
My goal with this formula is to produce a number of months remaining (rounding down) by subtracting today's date from the anniversary date. The Round function I put in there seems to not work as the result is the same when I remove it.
Another thing I am also trying to accomplish is having the date pushed forward if todays date is greater than the anniversary date. In this instance, I tried adding 12 months to get it back on track. So say the anniversary date is july 4th 2015 and todays date is aug 4th 2015, well thats gonna show negative 1 but if I add 12 it should bring it to 11 months remaining -which would make sense because the anniversary month and day is fixed but the years just get pushed.
View 6 Replies
View Related
Apr 1, 2014
Problem: I want to "round" (to 2 decimal places) numbers 1-5 down and 6-9 up. For example:
1.915 = 1.91
1.916 = 1.92
I know this is completely screwy but I have to match numbers up to a purchasing system that seems to be doing just that.
I've researched rounding in Access a lot and I understand Bankers rounding (that won't work), I understand Int() and Fix() both don't do what I need. I've something about rounding half down (which is what I think I need) or Floor which I don't quite understand.
View 14 Replies
View Related