Forms :: DSum Bigger Or Smaller Than 0
Jun 26, 2015
This is my code : (I am using 2007-2010 and its working like that)
=Dsum("*";"Table Name";"[Field Name] < 0")
I need to calculate only bigger than 0 or smaller than 0 doesn't matter..
I checked from Forum etc. there is only between 2 dates options.
View Replies
ADVERTISEMENT
Jul 30, 2013
I have a table with 3 fields. The fields are down1, down2 and down3. . I would like to use this table to create a new table (downtime). What I need too do is loop through each record in the table and place the three fields independently in my new table. For example, I would like to go to the first record in my original table, than place down1 as my first record in my new table, down2 as my second record and down3 as my third. Than I will go to the second record in my original table and place down1 as my fourth record, down2 as my fifth record, down3 and my sixth record and so on.
View 5 Replies
View Related
Oct 24, 2006
Okay, brief overview.
We currently have 2 MDE front ends to and oracle box. Database is about 25Gigs and have been minimising the traffic by optimising the queries. However we have always noticed some very strange problems now that our user base is about 150. They seem to become more apparent when the MDE files reach a certain size. I have implimented an autoshut down and inactivity shut down protocol into the access front ends but I would really like to know why the MDE files are getting so large. They are normally about 5MB but get to in exccess of 130MB. The autoshut down is forcing everyone out which compacts it overnight!
When these databases reach critical mass, peoples data seems to be getting mixed up and one persons form is mixing data up with anothers!!!!!! What is casuing this? We are using the front ends over citrix too, is this the root of my problems. I am going to be copying the MDE file to each citrix box to speed it up and reduce the number of users on the mde. Ideally I would prefer an mde for each user but that is impractical.
Really my question is this, Why does an MDE file with no tables except linked via ODBC increase in size so dramtically? Is there a leak or somthing somewhere?
Thankyou in anticipation of any replies!
Marc
View 5 Replies
View Related
Dec 14, 2005
I have a somewhat complex question.
We currently run Access 97 in the following way. We are looking for a solution where new members can access our data and change it using the internet. We are not sure of the best way.
Our database is split between "data" and "front-end". The "data" is kept on our win2000 server and is split into a "master" and several replicas. Some employees run their "front end" acceess programs on fixed computers attached to our network and simply attach to the "master" "data" database on our server. 4 employees use laptops and run their "fronends" by attaching to their own "replicas" of the "master" which they carry around with them. Once in a while, ususally daily, they synchronise their "replica" with the "master" on our server by simply attaching to our network using ethernet or WiFi.
What would be the best way to allow new members to join in the fun? There could be as many as 10 new members (brining the total to 16). The main problem is that they are located in different countries and ideally need to have a web or VPN access to our server. Does anyone have some suggestions? Should we migrate to SQL?
The database "data" is about 180Mb in size and has 40 odd tables that are used in a complex way by the "front ends". All queries are stored in the "front ends".
?? I would really appreciated some ideas..
Thomas
View 4 Replies
View Related
Jun 23, 2015
I have a volunteer information database, and I am working on the form that will show the details of each volunteer's hours worked, among other things.
I've attached screenshots of a more or less final version of the Relationships (I've tweaked it a little in the last day or so but nothing life-altering), the section of the form in question, and a query I wrote (probably incorrectly) that does return hours on a given month sorted by NameID, which is useful, but doesn't put the information into fields like I'd imagined I could. If I can't figure out how to make what I'd like work, I guess I could just put a subform that displays the results of the query, but I'd rather do it another way.
I tried this in the controls for each field:
Code : DSum( [tblHoursWorked]![MonthWorked] , "MonthWorked='November'")
Obviously switching out the months, but I'm getting the response of #Name? in each field. No syntax error so I'm not sure if I have something configured incorrectly in the text boxes or if there's a problem with the function.
View 8 Replies
View Related
Dec 7, 2013
How is the collection of a sum of money to a particular substance.There is, for example, in the table named baby milk product.How can I collect the amounts of such material only.I used a DSum
View 6 Replies
View Related
Sep 30, 2014
I'm trying to filter from dsum criteria the two values, here is my code :
Code: =DSum("Amount","qry_sumawpo","[Status] = 'FBLNG'" OR "[Status] = 'BLLD'")
How to correct this code. I need 2 different values in 1 criteria.
View 2 Replies
View Related
Apr 30, 2014
I have a dsum statement with multiple criteria that I cant get to work. Basically it returns no records, when it should return records that have a CategoryID = 1 and a State/Province = 14.
Code:
TotalSMECount = Nz(DSum("WorkingDays", "qryTotalUsageForDashboardNew", "CategoryID = 1" And "State/Province = " & Me.cboProvinceFilter.Column(2) & "")) + Nz(DSum("UsageDays", "qryEquipmentDaysRapidProtoCumulative", "CategoryID = 1"))
I am guessing that I just have the criteria portion written incorrectly Is there anything obviously wrong? For the record, when I debug.print Me.cbo Province Filter.Column(2) it returns the value '14', which is correct for my test data.
View 3 Replies
View Related
Sep 15, 2006
Hi Guys
Im' Pulling my hair out at the moment trying to get my forms to re-open in the smaller view after ive closed them.
Ive tried Cmd.movesize which works ok occasionally but when you turn your back the next time the darn thing opens maximised.
Is there a simple command to get the window to open in the smaller mode like DoCmd.Maximize does for the full size mode?
I would be much obliged for any help with this one.
Thanks in advance for any help offered
All the very best for now
Tony
View 5 Replies
View Related
May 9, 2015
So I'm trying to create a running total, to be able to graph a cumulative total. After looking around, I think I've figured out that I need to use a DSUM formula.I basically want to get a cumulative sum of profit in the 4th column.
View 7 Replies
View Related
Feb 16, 2015
How to use Dsum Function? Am using below following Dsum functions but they are not working and shown an error result.
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]=MILK"),0)
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]='MILK'"),0)
=Nz(DSum("[Liters]","[SRB_SubformQry]","[Category]<>MILK"),0)
View 3 Replies
View Related
Aug 11, 2015
I have a subform from which I want to calculate values into a text box on the main form, to keep a running total of weeks for individuals. Using the expression builder to just add the fields, I only get the total for the current sub-form record. If another record is added to the subform, the total reverts to zero, and then it takes that record's input as the total. Which makes logical sense.
I think I need to do a 'DSum' from the subform/table, but I'm not sure how to sum for just the current ID/individual. I have tried to bodge it myself with the expression builder, but it tells me that 'the function contains the wrong number of arguments'.
View 6 Replies
View Related
Mar 17, 2005
Hi,
To avoid the mind-numbing tedium of have to use make-table queries loads of times, is there a quick (probably VBA-related) way to split a large Access table, of about 350000 records, down into 93 smaller tables, based on a key code field that identifies each group of records e.g. GBW102, GBE999, etc?
Any help much appreciated.
thanks,
Alex
View 7 Replies
View Related
Jan 24, 2005
I am updating an old Access app. The first form, FORM_A, of the app displays in maximized window - as I want them all to display. I click on a button to open a new form, FORM_B, and do whatever I need to on that form, close that window to return to the first window, FORM_A. When I do, FORM_A is now displaying much smaller.
FORM_A's Has Modal property is =Yes.
When I try to change the "Has Modal" property to NO, it alerts me that all the module and macro code will be deleted - and it is. I made a copy before continuing so I still have a copy of it.
I have the OnLoad event set to a macro that short maximizes the window. I use the same macro for the On Focus event, but it does not change the display on focus.
I've tried changing it to Has Modal = No, then copying the old code back into the blank module for that form - doesn't change the display of FORM_A.
Any ideas? Thanks.
View 1 Replies
View Related
Sep 8, 2014
I need to be able to restrict users enter a value in the text box (on Form B) called "FTE Assigned" if Dsum of a field called "FTE Allocated" in another form A is less than what is going to be sum of FTE Assigned after the value is entered.
Both these forms are used by users to enter data in the 2 separate tables which are linked together through a join.
Master table - having FTE Allocated values and secondary table having FTE Assigned values.
Basically a message box would do if Dsum (of FTE used) is coming out higher than FTE allocated.
View 4 Replies
View Related
Jun 22, 2005
I am a newbie when it comes to Access and ASP but I am trying. I am in the need for some help.
I have a large table in Access 2003 and need to break it into smaller tables (not using a query) where the fields are the same except each of the smaller, new tables will hold info for a specific person. These smaller tables would need tro be linked to the larger.
Is there an easy way to do this? I need to keep it in tables due to the ASP software I use to generate the asp pages.
Is this possible?
My goal is for each user to be able to only view/edit their data and for the large table to reflect any changes made to the smaller table.
Thanks,
Dan
View 4 Replies
View Related
Jun 4, 2014
I have a table of logged entries. Each record has a date field (ValueDate) and an account identifier field (AccountID)
I also have a table of rates. Each record has the same account identifier field (AccountID), a date field (EffectiveDate) and a rate field (BankRate)
Entries can be logged for any given ValueDate. But there may or may not be a corresponding EffectiveDate in the rates table.
I need to write a query that will return all of my logged entries and the largest EffectiveDate which is on or before the ValueDate (as well as the BankRate corresponding to that EffectiveDate)
This is as far as I've gotten but it returns multiple records for each logged entry. I need one record per logged entry.
Code:
SELECT tblLoggedEntries.EntryID, tblLoggedEntries.AccountID, tmp.BankRate, MAX(tmp.EffectiveDate) AS EffectiveDate
FROM tblLoggedEntries
LEFT JOIN
(SELECT tblRates.AccountID, tblRates.BankRate, tblRates.EffectiveDate
FROM tblRates) AS tmp ON tblLoggedEntries.AccountID = tmp.AccountID
WHERE tmp.EffectiveDate<=tblLoggedEntries.ValueDate
GROUP BY tblLoggedEntries.EntryID, tblLoggedEntries.AccountID, tmp.BankRate
View 11 Replies
View Related
Nov 2, 2014
I have a form with subform . I want to calculate purchase quantity with criteria of product and quanties before sale date. If i use with specified date it gives correct result.but if i use field address it ignores date criteria
Nz (dsum ("pqty","purchasequery","product=" & [sales.product] & "and clerancedate<=#31/07/2014#"),0)
Nz (dsum ("pqty","purchasequery","product=" & [sales.product] & "and clerancedate<=#" & [forms!salesm!sdate] & "#"),0)
But it is not working
Sdate is date and it is on main form
View 6 Replies
View Related
Mar 10, 2014
I have put together a VBA sub to run Outlook.Application to send a report to selected email addresses. A Table's records contain an email addresses as well as category for grouping purposes.
I use a "Create Table Query" to extract the selected email addresses from the table into a temporary table called "ETransferAddress" then "Set rst = CurrentDb.OpenRecordset("ETransferAddress")" then concatenate the email addresses separated with commas.
This works fine for small groups, but the service provider blocks them if the number of email addresses go into the hundreds.
What I need is to break the email addresses into sub groups and then create a series of emails all with the same Report, Subject and Content.
One way might be to create a series of loops to create a number of smaller tables but to string that lot together to achieve it is beyond me at present.
Here is my code to date"
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Dim strPath As String
Dim strFilter As String
Dim strFile As String
Dim rst As DAO.Recordset
'Create a table with selected addresses
[Code] .....
View 2 Replies
View Related
Apr 18, 2013
I have a report that displays incidents, their details, consequences and a photo. Among the details is a severity rating high medium or low, I have been asked to make the report shorten the records which have been given a low severity (because it takes up as much space as the more important/severe ones).
The only method I can think of is to use the onformat event, to shrink and make invisible all the fields that I don't want to see if the severity field shows 'low'.
View 3 Replies
View Related
Jul 30, 2007
I want to add to values based on if yes or no is selected in an option group.
My thinking is to use DSUM. When 'yes' is selected I want to grab a value from one field and add it to a value in another field giving a running total. I am currently using the following code but it throws back an error. Is DSUM the way to go?
Case 1
txtTotal.Value = DSum("[s1]", "[s2]")
View 3 Replies
View Related
Mar 29, 2008
Hi there guys, ill keep it short and snappy,
Im trying to use the Dsum() function to add together the "Quantities" of specific products bought in transactions i.e. the total quantity for a product called "red t-shirt" and the total quantity for another product called "blue t-shirt". the following was the code i tried to use but it just adds together all quantities of all products:
DSum("[Quantity]","Query2","[Product Name] =[Product Name]")
Does anyone have any ideas at all please?
Thanks
View 7 Replies
View Related
May 17, 2005
Ok, I have a commercial database over which I have no control. It is ticket sales and I want to view them over time...
This is my table of transactions:
master_tix_header
tix_header_year
tix_header_performance_code
tix_header_no_seats - The number of seats sold
tix_header_first_transaction_date - The date of the transaction
The unique ID of the performance is made up of tix_header_year and tix_header_performance_code:
E.g.
In tix_header_year of 2004 there is a tix_header_performance_code of JSVH01 and in 2005 there is also JSVH01 - but there is never the same tix_header_performance_code more than once in the same tix_header_year...
Now I can get the number of tickets sold on each day using Sum() for a specific performance using:
SELECT SUM(tix_header_no_seats) AS TotalSeats, tix_header_first_transaction_date
FROM master_tix_header WHERE
tix_header_year = "2005"
AND tix_header_performance_code - "JSVH01"
GROUP BY tix_header_first_transaction_date;
This gives me:
TotalSeats tix_header_first_transaction_date
2 14/03/05
9 18/03/05
1 22/03/05
But what I want is:
TotalSeats tix_header_first_transaction_date
2 14/03/05
11 18/03/05
12 22/03/05
Can anyone give me any pointers?
I tried http://support.microsoft.com/kb/138911/ but it returned ambiguous results (seemed to reset the running total at the begining of each year...) or would say the query was too complex to run - I;ve probably missed something simple as I a newbie to the world of access/sql
TIA
Nick
PS: Access 97 if that makes any difference!
View 5 Replies
View Related
Jul 5, 2005
I am trying to add up the total amnt under a certain location # under a certain representative #. What im having the query do it pull information from several different tables including the rep # and that rep #'s loc #. I want to find the sum of the sales under the location # for that rrep #. So it will look it up based on the loc # after it finds the rep #'s loc #. What would be the best way to do that.
View 1 Replies
View Related
Oct 2, 2006
Hi!
Can someone tell me why the following querie doesn't work?
txtcharges = DSum("[Charges]", "tblcharges", "[DateCharges] >= '" & startdate & "' AND [dateCharges] <= '" & enddate & "'") '
Thanks
JonyBravo
View 3 Replies
View Related
Apr 23, 2007
Hi,
I have a table that contains Product, Manufacturer, Date and Cost and want to have a field that sums up totals based on criteria, for example, total cost for each manufacturer over a set period.
I think I need to use a dsum, but although I've tried to structure this query, I'm getting nowhere fast!
Any help is appreciated!!
P.s. I have no sql expereince, so please can any response not include a brilliant, but greek-to-me sql! :o
View 5 Replies
View Related