Ggrouping And Do Calculation On Number Of Records
Mar 20, 2008
Hi all,
I tried to make a query that can do calculation (sum/count/avg/etc) on certain number of consecutive record.
e.g.
Time; Value
1; 5
2; 3
3; 4
5; 2
7; 5
11; 8
20; 5
22; 3
25; 1
Let say i want to sum each 3 consecutive records
Time group; Sum
A; 12
B; 15
C; 9
Any function can be use for this?
Thanks.
View Replies
ADVERTISEMENT
Feb 3, 2005
Hi,
How can i do the following -
When a date is typed in a text box, ie, 17/01/05
I want a Query to return what Number week in the year it comes from.
In this example the result would be Week "3"
I'm sure this would be easy enough to do if i typed in every day in the year into a table with the
week number beside it.
Is there some code or a more straight forward way.
hope all makes sense, if not i can go into greater detail.
View 2 Replies
View Related
Dec 9, 2013
i have a form where I enter two dates i.e. a commence day and a final day and I also have a save button.I would either
a. have a control on the save button which pops up a message if the final day is greater than the commence day and so preventing the save record
b. Or if the final day is entered and is recognised as a date before the commence day then to pop a message saying so and preventing the save record.
View 6 Replies
View Related
Nov 20, 2007
I have an Access query that lists completed company forms by days to complete in descending order. I want to use the reccord number and total record count to present the percentage of forms that were completed at each completion date. Ther purpose is to quickly show that 80 percent of forms are completed within 60 days. This is easy to do in Excel using the Row() and Count() funtions such as 1-Row()/Count($A$1:$A$5000).
Is there a way to do this same thing in Access?
View 6 Replies
View Related
Jul 30, 2014
It is like a date calculator.
1. I have 12 unbound text boxes in the unbound form in 6 pairs.
2. Text1 receives the arrival date and Text2 receives departure date, Text3 receives arrival date and Text4 receives the departure date and so on.
3. A person may have any number of arrivals and departures between 1 to 6.
4. The person should not stay in this country for more than 6 years.
I need to calculate from the final departure date, the total number of days the person stayed in this country and the remaining allowable years months and days the person can stay in this country ( deducted from the 6 years period ).
5. Please note the final departure date can be in Text2 or Text4 or Text 6 field.
View 4 Replies
View Related
Aug 25, 2011
I have a column with a sum total in the footer. I would like to subtract this calculated number from a constant (i.e., 20,000.00). Is this possible?
View 3 Replies
View Related
Jan 21, 2014
I have a form [IUDATA]
I have a add record button.
I have a date field [DATEIN]
I have a text field [DRPNO]
If the [DPRNO] field is empty, I would like the user to have the [DPRNO] field be automatically populated after the user enters a date.
I'd like the format of [DPRNO] to be "dpr YY-XXX"
Where:
YY is the year of the [DATEIN] field and
XXX is number of records in that year.
So for example, if it was the 4th record with a 2013 date the [DPRNO] would be dpr 13-004.
View 12 Replies
View Related
May 10, 2005
Hello All. I am new to these forums but appreciate very much any feedback on my question:
I have a table in my database that retains weights for our clients. The table contains the following fields:
ID
ResidentID (relates to the residents table that has name, etc.)
Date
Weight
Each month with a client is weighed, the date and weight is entered into a subform.
I am attempting to perform a calculation in a query and/or report that would automatically give the weight gain/loss between the last two entries.
Any suggestions on how to do this? There is of course the "last" function, but I cannot figure out how to get the record just prior to the last.
View 2 Replies
View Related
Dec 4, 2006
I'm working on a database used for tracking production. Currently, I have a query based off of multiple tables that looks like this:
Product__Date_____Shift___Throughput_Rejects
A...........12/4/06.....1.........1500...........5
A...........12/4/06.....2.........3500...........22
A...........12/4/06.....3.........4000...........29
B...........12/4/06.....3.........500.............8
B...........12/5/06.....1.........2000...........14
As you can see, each shift records the numbers cumulatively. I want to create a query that will tell me what the throughput & rejects (and eventually yield) are for each shift. I already have figured out a way to sort the query correctly so I had anticipated on just saying:
If (CurrentRec.product = PrevRec.product)
Then
ThroughputPerShift = CurrentRec.Throughput - PrevRec.Throughput
Else
ThroughputPerShift = CurrentRec.Throughput
The above is obviously my own syntax. How would I go about doing this in VBA?
View 5 Replies
View Related
Jul 10, 2006
I've created a report and report has the same number of pages as the number of records that it's displaying.
If there are two records, the report has 4 pages...the first 2 are the actual report and then the other 2 are a copy. If there are 3 records, the report would have 3 copies (...6 pages).
Any idea how to change this so that I have only one copy of the report?
View 1 Replies
View Related
Feb 28, 2014
I have created a mock employee database to work out kinks before I create the real one. One table has employee info (employeeID, name, address, email, phone numbers, etc.). The other table has "employee actions" with fields: employeeID, actiontype, salary, jobtype, jobtitle, jobhours, bonus, actiondate. Actiontypes are "hire", "salary change", "bonus", "leave". It is a little more complicated but that is irrelevant to my query question...
I created a query to show employee salary changes, amount and action date. I want to create a calculated field that shows the dollar change and percentage change from last salary to new salary. So the query involves multiple records or rows, which seems to be a black hole in terms of information on how to do this. If it were Excel, I would just do a quick nested function calculation and be done with it but with Access, where each record is independent of the others, how to calculate it. I know there must be a way to do this because otherwise, what good would an employee database be?
So the questions are: (1) can you do calculations (other than totals or counts) using multiple records/rows? and (2) if so, how do I do it? It seems I would have to do a a specific sort and it would not be easily updatable.
View 12 Replies
View Related
Mar 22, 2013
One shows my form with the Transporters Subform with 3 entries, and 1 entry.The three line items that say "Transporter" are in one subform. I used this code
Code:
Private Sub Form_Current()
If Me.RecordsetClone.RecordCount >= 3 Then
Me.AllowAdditions = False
End If
End Sub
to limit the number of records I can add to 3 or less.My issue is that I lost the blank text box that allows you to add another record. So, if I only have one Transporter listed, there's no box to let me add a second or third.I have the following properties for the Transporters Subform set to "Yes":
Data Entry
Allow Additions
Allow Deletions
Allow Edits
Allow Filters
View 3 Replies
View Related
Oct 26, 2005
Here is my issue. In a table with an Auto Number index some records have been deleted. I have been able to recreate them along with their original auto number. The problem is that I do not know how to append these records forcing the original auto number. I have tried changing the auto number field to a number field in the table, this works except I cannot change it back to auto number.
I am sure I’m not the first with this question or issue. I did search through a couple hundred entries about auto number before I posted this question.
Jim
View 7 Replies
View Related
May 3, 2006
hi all,
This is general question only. How many number of records that Access can handle as a maximum records?
Or it only depend on size limit (4GB)???
thanks
View 2 Replies
View Related
Mar 10, 2008
Is there a limit on the number of records you can have in an access database? I've got one with 8500 records and it's been a PITA! I have a webpage on our intranet so users can go and enter their information to it, and they get a nasty error whenever they try to enter information. I'm trying to figure out why and i was just wondering... i know it's not the webpage because when i connect it to my test database it works fine? so i dunno :confused:
any help is greatly appreciated!!
View 4 Replies
View Related
Mar 29, 2005
Hi All.
Is it possible to limit the number of records in a form, to a number given in a linked form.
For Example.
tblA
StreetName
No_Of_Houses
tblB
Name
Number
I would only want the number of records in tblB to be the same as No_Of_Houses in tblA.
I have seen previous threads where you can limit it to a number, but do not know where to go from there.
Can anyone help?
Thanks.
Frank.
View 1 Replies
View Related
Jan 17, 2006
I have a table that contains a number of email addresses. I need to combine a number these into a single record to allow me to email a report to a number of different recipients depending on the client the report is for.
At this point I’m not even sure were to start.
View 12 Replies
View Related
May 19, 2005
I have a database that allows the user to order clothing items.
Each size of each item has a different stock number.
I have [StockNo] - [StaffNo] - [Qty] i need to generate [OrderNo].
The problem i have is that [OrderNo] is incremented after every five five items (ie[StockNo]).
This gives me my first problem of selecting just the first five records of a table in order to allocate an order number.
The second problem i have is that in order to allocate an order number, i have to summarise the [Qty] by [StockNo].
This gives me the opportunity to select the order number but i lose the individual [StaffNo] information.
This information, together with the [OrderNo] is needed for a master order table.
I have created a crosstab query which summarised the [StockNo]but how do i retrieve the [StaffNo] information from the column headings.
I am new to Access and would be grateful for any help or comments as to whether i am going about solving this problem in the best way.
Thanks
View 1 Replies
View Related
Dec 20, 2005
Hi.
I have a form (frmdetails) to store job details and another form (frmMaterials) to add materials to each job. They are both linked via a field Project_No
I have a query (QryTotal)that when run will list the materials used for each project, that is all OK.
What I am tryng to do, is add a text box to frmdetails, that will just tell me how many materials have been booked against each job. Just a running total that will tell me that for project number 100000, 4 items have been booked.
I have tried using subforms (using =count(*) ) but this doesn't seem to be working. I also added =Count(QryTotal!Material) to a text box but this doesn't work.
Can someone help?
Thanks.
Frank.
View 2 Replies
View Related
Feb 13, 2006
I have a query that pulls data from two tables. I need to have another column in the query that numbers the rows like a primary index or gives each records a different number. Any ideas without adding any columns to the orginal tables.
Thanks in Advance,
Greg
View 2 Replies
View Related
Apr 17, 2006
I want to run a query to add up the total number of records in a table.
i have looked at the Microsoft help but that tells me how to add together the totals of the fields but not the total of fields
any ideas?
Thanks
View 5 Replies
View Related
Jan 10, 2007
Hi, i have a query which contains two fields: PtId and visitdate. I'd like to create a field that sequentially numbers the visits.
If you're really smart, the second part of my problem involves computing the time from the last (or max) visit to the visit before it. I was thinking if I had the visits numbered it would make this task easier, but if there is another way, that would be even better!
Thanks so much for your help!
View 14 Replies
View Related
Apr 9, 2007
Hi-
Im importing 80,000 records into a table and then using a query to reformat the records and append them to a second table. The import works, but the append quits after about 6500 records. Is there a limit to the number of records an ACCESS query can handle?
View 3 Replies
View Related
Apr 26, 2005
Is there a way to set the number of records to say....25 per page then starts a new page?
I do have a footer with the inserted "Page Numbers"
View 3 Replies
View Related
Feb 22, 2006
Acc 2003
Hi,
Does anyone know if this is possible. I've looked but can't find anything like it posted within the forums unless I'm searching for the wrong keywords.
If I have a list of records on a continuous form, I want to drop a combo box at the end of the each record with a list of numbers in ranging from 1 - 100.
When a value is chosen, the selected record is then duplicated by that number.
For example, Select a record, choose 20 from the combo box = 20 new entries of the record.
Also, as a side issue, is there a way of omitting or clearing certain fields from the process.
For example, Serail Numbers are unique, so I want the user to have to manually key these in once the duplication process completes.
Hope I have explained this in enough detail.
Thanks
Kempes
View 4 Replies
View Related
Mar 23, 2006
A form i have gains its records from a query. I know that the number of records found is displayed down the bottom, but is it possible to have a text box displaying this, so i can choose where on the form i have it?
TIA
Dusp
View 1 Replies
View Related