Firstly I rather unsucessfly tried the search function,
I want to automatically delete any enteries older than 6 months, I do NOT want to archieve them, simply delete them. I only have three entries; Date Address Line 1 Post Code
I was unsure how i would go about this or even where to begin so some help would be much appreciated.
I have a querry designed to show loans that have a start date and an end date. I want my querry to show loans that have a start date, no end date, and that are 3 months old. Here is what I have so far but I can't figure out how to increment the 3 months on the start date:
SELECT Detail.CustomerID, Detail.TransactionID, Loan.LoanAmount, Loan.StartDate, Loan.EndDate, Loan.LoanLender FROM Detail INNER JOIN Loan ON Detail.CustomerID = Loan.TransactionID WHERE (((Loan.EndDate) Is Null)) WHERE ((( Loan.StartDate)) Is
I need the code for a filter or query which will show the past x (12, 24 etc) months worth of data. Each record has a date tag so i need a filter which will just show records for say the past 3 months.
Im not sure this belongs under FOrm but most likely.The thing is I have 5 tables and 5 forms each table connected to each form.My problem is when I enter data into the form and then it saves into the table.The next time I open my program and I enter another information into the form it goes into the table but it goes over the older one I entered..SO my problem is I can only save one record into the table because it overwrites the older one. Thanx
My form has a piece of code in it that deletes records older than two years :
Code: Dim dteExpiry As Date Dim strSQLDelete As String dteExpiry = DateAdd("yyyy", -2, Date) strSQLDelete = "DELETE from tblWaarschuwingen WHERE tblWaarschuwingen.datum2 <= #" & dteExpiry & "#;" DoCmd.RunSQL strSQLDelete But...
As it turns out it does not only delete records older then two years, but also records related with personnel number to that record !!
Now i do relate records by personnel number (its NOT the primairy key though) but in this case its not meant to do that !
How to build a query in Access 2010/13 that will not display any records that are older than 3 hours? See below for more specifics.
The criteria would be based on a field that houses the time (End Time) and also a field that houses a number (Status). So, only if the field in the record says 3 (based on the Status field) then it should not display the record after 3 hours (based on the End Time field) of being changed to a 3. Is it possible to do that?
I have attached a screenshot of what I am referring to.
I want to create a simple query from a list of orders dating back over 12 months.
The fields I have is Ord_Date, Qty
I need to show the orders by month for the last 12 months.
The problem I am getting is that the orders for the month of April (as we are in April now) contain orders from 1st - 22nd April 2013 and orders from 23rd - 30th April 2012, therefore confusing the figures.
I would just like orders grouped by month with a total qty dating back 12 months, but without any old orders for the current month.
I currently have a form where users can enter an "End Date", click a button, and it queries the data from 12 months prior to "End Date" entered.
Is there a way to force the query to show all 12 months, even if there are no records for a particular month? For example: if the user enters February 2013 in the date field, I would like the query to return:
March 2012 April 2012 May 2012 June 2012 July 2012 August 2012 September 2012 October 2012 November 2012 December 2012 January 2013 February 2013
...so even if June 2012 has no records, it is included in the query with a value of zero.
This is what I have so far:
WHERE (((Qry_Tbl_Assets.Dte) Between DateAdd("m",-12,[Forms]![Main_screen]![End_Date]) And [Forms]![Main_screen]![End_Date]))
Can't think how I would do this. If I create a query with a certain date then it will need to be changed every time the query is run. How would I write a query that automatically looks for a date 3 months or more old.
We have a field (tbl_Enrolment.CourseCompletedOn) which holds the date a colleague completed a course. I want to bring through all courses completed within 12 months of todays date ( Date() ) from our database. I checked google and it suggested YEAR but that would only bring through dates with the same year, not within a 12 month period.
I have built a qry that initially shows the correct information. For example.
tblContent has 289 records with a Type = Class.
I built a Query to select from tblContent Type = Class and I get 289 records. I add additional criteria of Progress <>"Not Scheduled", I then get 206 records. I then add additional criteria Last Name <>"Demo" And <>"Care" And <>"Support". This brings up 200 records, but the query appears to duplicate each record 3 times. I do not have 3 of the same types of records.
The SQL Statement is below
SELECT tblProfile.LoginName, tblProfile.FirstName, tblProfile.LastName, tblProfile.Organization, tblProfile.CostCenter, tblContent.Title, tblContent.Type, tblContent.Code, tblContent.[Date Assigned], tblContent.[Date Started], tblContent.[Last Accessed], tblContent.Progress, tblContent.[Date Completed] FROM tblProfile INNER JOIN tblContent ON tblProfile.LoginName = tblContent.LoginName WHERE (((tblProfile.LastName)<>"Demo" And (tblProfile.LastName)<>"Care" And (tblProfile.LastName)<>"Support") AND ((tblContent.Type)="Class") AND ((tblContent.Progress)<>"Not Scheduled"));
The qry is named qryPhysical Class. I have provided the link to view the database. Can you help me?
Hi, we have a database for keeping record of our games (unreal tournament games).... Its just a simple database and we enter our results based on the following fields: -
Opponent: Game Type: Players: Maps: Date: Result:
the file has started to get quite big and wondered if it would be possible to automatically move entries say that were older than a month old to a new table, or archive table. Im not a big access genious so i hope i have explained enough for you to understand what im trying to do here.
I need to find the LATEST date in field Recdate that is 45 days or older in a query. I have tried <Date()-45, etc. but it returns all dates not just the last one. Does this require a range of dates to do this ? If not, how would I id the last date input ? Thanks
I have [Product] in Orders Table and Orders Form as Combo Box for showing Product from Products Table.
And within product field on Orders, I want to make 'Active' product only showing up when choosing from combo box.
I made some records to test in Orders Form. Then I filtered Product from Orders Form with query:
Code: SELECT Products.ID, Products.Product, Products.Active FROM Products WHERE (((Products.Active) Like Yes)); Then I changed some product 'Active' to "No" And the old record disappearing.
How to make older record not disappearing when I filter some of field not being available to choose (because Active product uncheck)
I've built an an update query that updates a Yes/No field "Expired?" to "Yes" if the expiration date has passed i.e. if the current date is newer than the expiration date. I thought this would translate into the current date being greater than the expiration date?
UPDATE Alert SET Alert.[Expired?] = 'Yes' WHERE Alert.Current_Date>Alert.Expiration_Date;
When I run this, it identifies the records to be updated, but then stops updating the fields due to "a conversion failure."
So I have a report generated, listing all my companies personnel in one column and the next column has the expiration dates of a certian training certificate. My question i would like to add some statistics to the bottom of the report, mainly how many certificates are expired, which is the ones over a year.
I have attempted to use:
=Sum(IIf([AT_LEVEL 1]<"Now()-365",1,0))
previously in excel my spreadsheet counted it like this:
My table occasionally gets a second record added for the same person. What is the easiest way to update the new record with the non-zero fields from the older record, then delete the older record? There is a unique id field as well as a timestamp, so knowing which is older isn't a problem. Is there an easy way to do this?
I have a table with an autonumber incremental ID field using the format 0000, 0001, 0002 all the way to 1530. I'm trying to create a query that returns the last 5 records in decending order, so...
I have a subform which loads the items from a table the form is non editable just for viewing the items, the problem is how can i A. limit the subform to only show the first say 10 items in the subform B, to have a command button on the form where the the subform is on (command button not in the form) and when the user clicks it it goes to the next set of records say from 11 to 21 and displays that in the form.
i tried doing record cound but somehow record count is not there when selecting, also would the code go in the subfrom on load or on the form load where the subform is based?
This is fairly simple i think although i cant do it right i have a field in a query named; "shiftdates" which uses the format: DD/MM/YYYY, how can i set the criteria for this to only show records from the past 7 days?
i think i need something like: date()-7 (this doesnt work though), anyone help me out?, :o