Queries :: SUM Of Fieldname Holler When Fieldname Area Has The Same Value
Jun 26, 2015
I have got a query which gives me the following output;
Nr ----------- area ------- area 2 ---------- holler
14-1096-------1------------1-----------------5.9
14-1097-------2------------2-----------------7.8
14-1100-------1------------1-----------------13.4
14-1101-------2------------2-----------------7.8
What i would like to do is to calculate the sum of holler when they are in the same area.So the sum of nr 14-1096 + 14-1100 and 14-1097 + 14-1101. Ive tried to do the following;I tried to do the following just to check it would even work;
Code:
test: (SELECT Sum([holler]) FROM querytoetsn2hr_gemiddelde_filter WHERE ((querytoetsn2hr_gemiddelde_filter.area)=("1")))
Which worked perfectly, it gave me 19.3..
Code:
test: (SELECT Sum([holler]) FROM querytoetsn2hr_gemiddelde_filter WHERE ((querytoetsn2hr_gemiddelde_filter.area)=(querytoetsn2hr_gemiddelde_filter.area2)))
That gave me the sum of all 4 the Nrs. Which makes sense, because you basically say that as long as area and area are the same calculate the sum of holler.if there is a way to say "sum of holler when area has the same value".
View Replies
ADVERTISEMENT
Dec 22, 2005
Hello friends,
I am having trouble displaying or updating data through all my subforms.
So im just trying to isolate the issue,
I went into my table definition and changed fields named with seemingly reserved keywords as follows:
name = personName
userId = personId
Now, i have hundreds of report and queries based on these tables (3+) with these fields. What do i need to do to automatically update my reports and queries without going into each one to manually update :eek:
Is that what the autocorrect option does? I have been advised to always have it turned off as it causes database corruption.
So how do i update my all things with these field name change.
Any suggestions, comments would be greatly appreciated :)
View 8 Replies
View Related
Mar 1, 2007
I ahve in error typed the above - however it compiles and compacts and repairs without throwing an error. Should this be spotted before I actually run the line of code??
Ta
View 10 Replies
View Related
Dec 13, 2007
I am trying to create a query that can be customised by a combobox.
I have a combobox that lists the fieldnames from table (rather than records)
I want to be able to run a query that updates the field selected from combobox with the vaule from another txtBox
What I want to be able to write in SQL is;
UPDATE Products
SET [Forms]![Master_Form]![Combobox] = [Forms]![Master_Form]![Qty]
WHERE (((Products.ProductName)=[Forms]![Master_Form]![ProductName]));
But of course this does not work.
Any help would be appreciated in SQL or VBA?
View 4 Replies
View Related
Apr 24, 2005
I have a form with numerous fields and would like to be able to move the focus to a selected field by typing the field name into a control box. How can I do this? TIA
View 4 Replies
View Related
Aug 8, 2013
I have a form with 48 unbound text fields name txt1 to txt48.
These are to represent 24 hrs in half hours, to visually represent the hours capacity of my workshop. Now if I choose a date, which is say Monday, I check my settings, and see that the workshop has a capacity of 15 hrs on a monday. Now I would like to in a loop set the backcolour of the remaining fields to red.
Something like for I = 15 (workshop capacity) to 48
me."txt" & I.backcolour=1111
next I
View 3 Replies
View Related
Mar 5, 2006
I have a report named rpt100 with two subreports srpt100a and srpt100b. The subreports are based on query qry100a and qry100b. Both queries are based on tbl100. I removed a field named 'Comment' from tbl100, as it wasn't useful; Also removed the fieldname from both qry100a and qry100b. When opening rpt100 a parameter dialog opens asking for data on the deleted fieldname 'Comment'. The field 'Comment' was never used in the report or subreports.
Inspection of the subreport fieldlist shows field 'Comment' still present.
How, other than remaking the rpt100 and both srpt100a and srpt100b, do I remove the field 'Comment'?
Gunner...:confused:
View 1 Replies
View Related
Feb 20, 2008
As example, I have a table with an Item number, introduction year and a number of historical and future Sales periods set per year, these sales columns are listed Y1990, Y1991, Y1992....... Y2015.
Based on each items introduction year, I want to list the first 5 years of sales.
I wanted to create a dimensional fieldname eg: FirstYear: "Y"&[introduction year] to get the value of that respective year. (I currently just get a text saying "Y1995", and not the content )
Any help is appreciated!:)
(Note: I can't transpose the data in the tables for other reason)
View 3 Replies
View Related
Jan 22, 2015
Access 2010 report. I am trying to use DCount but have a string for the fieldname and cannot figure out the correct syntax. This is what I have tried:
txtMiscYes1 = DCount("[" & str1 & "]", "tblTemp", "[" & str1 & "]" = '1')
I want to count any answer that has a 1 and skip a 2 or 3 answer.
View 5 Replies
View Related
Aug 12, 2014
I want to use a variable as FieldName in the DLookup function.
Normal DLookup:
Code:
DLookup("FieldName" , "TableName" , "Criteria= 'string'")
I want to use:
Code:
DLookup(variable, "TableName", "Criteria= 'string'")
Where variable is an integer, which represents the column number in the table.
Is this possible?
View 7 Replies
View Related
Oct 16, 2012
I have a database where I would like to change a fieldname to something different.
I know I can use edit replace in the code and that works ok, but is there a way to change the fieldname in the code, the Table, the queries, and sql all in 1 foul swoop or do I have to do them all seperately by hand.
View 3 Replies
View Related
Apr 22, 2006
Hello all :)
I've read some really funny stuff while searching for an answer to this. You're a bunch of really witty types :)
So I'm sure someone can help me - why would this entered data not make it into the table?
I have a form that has a subform. After the subform I have a button to continue. If this is clicked I change the visible property for another field to true. This field appears to work fine, but the data doesn't make it to the underlying table, in fact it sometimes seems to be included in the next record.
Any ideas?
Thanks
A.
View 4 Replies
View Related
Nov 30, 2004
Hi,
Self learning trying to modify a query fieldname and criteria thru code.
Have a small form with a button making a copy of a query/s (eventually making about 50 copies).
Once these have been made, would like to open the query up, which I can do, then modify both
the fieldname and the field criteria to suit my needs from parameters set in the form.
How do I do this if it can be done ?
Thanks in advance
Ian T
View 3 Replies
View Related
Nov 30, 2006
Im running a query and normally there is only a field-name in heading. I have
multiple tables with equal field names. Now I want to get table names in
heading too (Tablename.Fieldname) so I can make difference between fields on each tables when previewing query. Is this possible in access? I don't want to change all field-names manually, I know it's possible and done easily, but there are almost hundred fieldnames...
Im finding a solution. Help me please. Thanks :eek:
- Roger
--
Have a nice day.
View 1 Replies
View Related
Apr 10, 2007
Hey guys, I am trying to input data into a form, the form consist of mulitiple tables. Once I set it up I get a "#Name?" error in the text box, and when I try to input data into the text box, at the bottom of the form it keeps saying "control can't be edited; it's bound to unknown field 'FieldName'."
Can anybody help me with this problem?
Thanks
View 8 Replies
View Related
Apr 18, 2006
Ok, I have a form where new clients are entered into the system. We would like to have an automated check that could be run which would check several different fields and compare them to several different existing fields in two different tables to see if the same name shows up. What is the easiest way to go about doing something like this?
Thanks.
View 1 Replies
View Related
Oct 27, 2013
What I am trying to do is i have a list of area codes connected to other data
What I want to do is do a search on a telephone number and this will check against the area codes and diaplay the required info
Example
Area info1 info2
01234 ab cd
012345 ar mc
01235 fg tr
So if I put a number like 01234567890 in the search box the result it will show is 012345 ar mc as this si the closet match to the telephone number.
I did it in excel with
=INDEX(whatwouldbedisplayed,MATCH(searchinfo,rowof data,1))
Im not to sure if this can be done as a query so would it have to be a macro?
View 2 Replies
View Related
Sep 16, 2013
I have a query to count the number of society members in a particular UK Postcode area. It works well for a single Postcode reference but adding further references to the Query Design View generates an 'or' or 'and' statement, rather than the additional counts that I need.
The SQL code I use for a single reference is :
SELECT Count([Mail List].[PostCode]) AS CountofPostCodeH
FROM [Mail List]
WHERE ((([Mail List].PostCode) Like "BN5 ???"));
How do I amend this code to produce counts for multiple references in one query.
View 9 Replies
View Related
May 21, 2007
Sorry if this is inappropriate, but I don't think I've ever seen a post by a mod saying so.
We're working on a project developing an enterprise class solution for the petro-chemical industry. Currently we are building a prototype in Access and are in need of an Access developer to help with it.
If anyone in the Houston area is free and would like 2-4 weeks of work, please let me know. Our need is immediate, and would require that the individual work here at our office in Texas City.
Thanks,
Shep
View 1 Replies
View Related
Jul 11, 2005
I am a novice to Access so bear with me please. I've just created a form to populate some tables.
When I switch from design view to form view, the detail area in the form view is blank. :mad:
The header is fine but fields, which are present in design view are not present in form view.
Any suggestions, I've tried font/background colors and searching for a switch setting.
Thanks in advance,
JA
View 1 Replies
View Related
Dec 8, 2006
Is it possible, and if so, how, to change the colors of the background area where the navigation bar is?
(Area marked within included image)
View 2 Replies
View Related
Mar 12, 2004
How can I make my forms use the whole viewable screen area no matter what size monitor or resolution the end-user is using? I would also like all objects to be seen in the viewable area without the end-user having to scroll down or to the right. Is this able to be set in the form properties somewhere? I hope I am clear with what I am saying.
Thank You,
Chad
View 3 Replies
View Related
Feb 12, 2015
I need to make a random schedule every week. I have a new DB that I have attached and the current one being used that was built by some one else. The reason for building the new one is I could not figure out what to change to add a new section/Area for scheduleing.
What I have are 3 levels of auditors
Level 1 are the basic auditors which I will need 1 per shift per day
Level 2 Are operationl Auditors I will need 2 of the per week
Level 3 are management auditors and I need one of those per week.
When I get these compiled per week I will need to make a report to e-mail out.
I attached both DB's the old one to show what I need, and the new for a more stripped down and easier to update version.
View 14 Replies
View Related
Oct 20, 2005
Hi all
First off, I hope this post is not inappropriate for this forum!
I'm looking for a designer for access in the Wagga NSW Australia area to help me design a database for our small business.
Some of you may have seen some recent posts by me regarding an invoice database. I was attempting to do this on my own but I now admit defeat. I can't get my head around the basics let alone the difficult stuff so whilst I have made a few DB's myself in the past they were basic, this one is way too complax for my hard head.
I would love to hear from anyone in my area who could help with this on a one on one basis (Hence the need for being close to me)
I am willing to pay for this service & would appreciate if the person understands that I want as much input in the design as possible so I can understand it top to bottom when completed.
Obviously I would like some kind of idea how much this would cost me. Bearing in mind itis tutorial sessions as much as design I am looking for. I would dearly love to be able to do this myself via some TAFE trainning or the like but I simply don't have the time for courses etc as my schedule is very hectic.
Anyways, enough reasons, the gauntlet is down, anyone care to pick it up?
Regards Mik
PS - I would like to thank all those who tried to help this poor wretch but I'm afraid I am a monkey see monkey do kinda guy, much better with one on one.
View 5 Replies
View Related
May 4, 2006
I have a form (eg. frmMain) with a subform (eg. frmSub).
The subform is going to be a query which displays results based on criteria defined in the main form.
So say frmMain had a field called 'OrderDate'. When they typed an order date, all the orders on that date appear in the subform.
The way I have it set up at the moment is that the query criteria is like [forms]![frmMain]![orderdate]
Do this means that once the order date is entered - there is still no results in the subform because the query has already run when the form was opened and, as this field was then blank, no results were returned.
I would like to keep this setup, but - instead of having the subform set to the query, it would be set to another form which just has a commond button.
The user will then input the OrderDate - click the button (which is in the subform) and the query will run. This can be done easily. HOWEVER, is there a way for the query results to be displayed in that subform area after the button has been clicked instead of opening up a new form.
I know in web design you can target links to frames, so wondered if this was possible?
View 1 Replies
View Related
Oct 16, 2006
Hi..
I am using RTF2 ActiveX Control which enables me to include the Rict Text Controls in my Access Form.
I want to generate a doc document out of the information which i type in the RTF2 Area on the Access Form. And whatever Rich Text Format information i have written there (for eg in Bold, Italics, Indentation, Tables created, Bullets n Numbering etc), is retained as it is on the Doc document which i am generating with the help of bookmarks.
Please help in how do i do that 'coz i am not able to do it using the Rich Text Format...
Thanking you,
with regards,
Kapil Sharma
View 3 Replies
View Related