General :: Delete Specific Range Of Date Record
Jun 26, 2014I want to make a delete query, which delete record between certain dates, I want access to ask user to specify range of date before executing the query.
View RepliesI want to make a delete query, which delete record between certain dates, I want access to ask user to specify range of date before executing the query.
View RepliesI'm working on a loan database for my personal use and obviously I'm new to access
See attachment ...
I am trying to connect to excel from Access database. Once I make the connection I want to delete data from a range on a specific sheet. There are 4 columns on the spreadsheet but i wouldn't know how many rows. So for example, A150... but I may not know what the last row is. How would I be able to delete data from a range of columns to the last row?
View 4 Replies View Relatedso i have an interesting question and im hoping that someone can help on this one. i need to pull date from a specific table, no problem, that's written and working fine, next i need to be able to join the data from another table by a primary key, again no problem. third, i need to be able to select the date (using WHERE) for a specific date range. (i.e. i enter the date range of 01/7/2007 to 15/7/2007) and the query comes back only showing the data from that specific time, not the data from before or after. this is where my problem lies, all the entered data is being shown after entering my date range. i am going to include my SQL statement, just so you can actually see what im really talking about.
SELECT srealest.Name0, srealest.Dist1, SREpayments.Face2Pd, SREpayments.Penalty2Pd, SREpayments.[2paid], SREpayments.Face3Pd, SREpayments.Penalty3Pd, SREpayments.[3paid], SREpayments.Face4Pd, SREpayments.Penalty4Pd, SREpayments.[4paid], srealest.Map, srealest.Parcel, srealest.LeaseHold, srealest.TaxRebate1, srealest.TaxFace1, srealest.TaxPenalty1, srealest.TaxYear, srealest.BillNo, srealest.PdRebate1, srealest.PdFace1, srealest.PdPenalty1, srealest.DatePd
FROM SREpayments INNER JOIN srealest ON SREpayments.BillNo=srealest.BillNo
WHERE (((SREpayments.[2paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]) Or ((SREpayments.[3paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]) Or ((SREpayments.[4paid]) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date])) Or (((srealest.DatePd) Between Forms![SD SRE]![Beginning Date] And Forms![SD SRE]![Ending Date]))
ORDER BY srealest.Name0;
any thoughts or ideas on how to accomplish this would be greatly appreciated!
Hi all, I need to extract in a query a recent range of records, these records should be all before a certain date and all the following future records example:
if today date is 12/12/2007 I need to extract all records that are dated from the 1st of november and all the records that come after the 12/12/2007.
In the criteria I have set "Date()" what else should I be adding to get the range mentioned above?
Thanks
I'm having issues with reports. What I want to do is only print specific dates in a report. I have read and tried everything to accomplish this but it just isn't working. Any suggestions????????????
View 2 Replies View RelatedI have multiple buildings that I own. Each building earns a monetary amount each day. Some days they earn $0, some days they earn $1,000. This is all kept track in a data base in which someone manually enters the information each day.The three fields are:
Building
Date
Profit
I have narrowed a query down to one building, and I am interested in two things. How do I write a query that shows a 30 day peak (the most profitable 30 days). In other words. I want to see the following
Building: GNB Tower Date: 02/14/13 - 03/15/13 Profit: $25,162
The next thing I am interested in is a 7 day peak from within these 30 days. This shouldn't be too difficult if I can figure out how to query these 30 days, I can query 7 days out of those 30 days. So this bigger mind stumper is the first one.
out of a date range of months and months (Let's say 10/12/13 - 6-14-13).Once I figure this part out, I am sure I can figure out how to compile all buildings into one large report with their 7 day peak and 30 day peak.
I am trying to calculate the total hobbs time (Ending Hobbs - Starting Hobbs = Total Hobbs) based on a user inputed date range. The query that I created (see attachment) doesn't seem to give me what I'm wanting.
View 14 Replies View RelatedI have a weekly list of transactions that come in the format DD/MM/YYYY HH:MM:SS, I need to tag these individual transactions with a week number. The problem is, I can't use the Datepart function etc. as the day is classed as running from 8am to 8am rather than midnight. I have a list of all of the weekly date ranges for a few years (with the time) so I was able to solve this problem in excel by using the Index and Match functions. However, I'm trying to automate this process as much as possible so I'd rather perform this function in Access.
View 4 Replies View RelatedTable Name: Admin
Field Name: userid, admin (Y/N), Password, ConPw, PasswordReset (Y/n), Createdby
Trying to run a vba to find and delete records that was "createdby" the current user. Enviorn("username")
I am trying to filter out information for an ODBC query I have written, to obviously make it more concise. Because our data is not set up very logically, a lot of my queries are based on text...but that is another story. My current situation starts with a simple make-table query finding certain data within a date range. This is followed up by another simple make-table query to find other specific data within another specified date range. Then I have a cross-tab query between the two tables to locate all the data that shares the same unique identifiers. My problem lies with trying to only pull information from a certain date range. For example, I want information to be included if the data has the same unique identifier as well as falls within +/- 7 days of the received date (dd/mm/yyyy) also listed in one of the tables. Each record will likely have different received dates so I cannot set it as a constant.
Make sense to anyone? I am not confident enough to play around with some expressions...well it is more I haven't been successful at using them correctly.
All help is greatly appreciated.
Thanks,
Jay
I am trying to create an access database to allocate people to projects and show the total time spent on projects. As peoples time can be allocated to different projects I want to add up the proportions of their times per day and show the results in a graph.The data I am entering is the date they start working on a project (Start date), the date they stop (End date) and their time allocation (e.g. 50%). How can I use this data to sum for date ranges?
I have attached an example database showing the problem. In the report the graph shows the type of thing I want for the output, clearly showing the total time spent on a project is more than 100% on one day and less on another day. Do you know how I can do this?
I am trying to write a function in an access 2007 query that will calculate the date range for each of my records based on the month-ending date and the In-transit days assigned to each record (excluding any weekend days) (i.e. if the in-transit days number is 5 & the month ending date is 5/26/12 then my date range would be 5/22/12-5/25/12). I want the funtion to calculate the range, I cannot use parameters as each record will have a different range based on it's in-transit days .
View 1 Replies View RelatedI have the following function which works well except when I want to run a search using date range and any other criteria on another text/listbox or combo box.
This is work i get in the immediate window (Where Status, TypeID, PurposeID are the other criterias used with the date range.):
Code:
WHERE ([Incident_Date] Between #02/06/2012# AND #02/06/2012#)[Status] LIKE '*Active*' AND [TypeID] Like '*1*' AND [PurposeID] Like '*2*'
And the Build Function is as follows:
Code:
Private Function BuildFilter() As Variant
Dim varWhere As Variant
Dim strField As String 'for the date field
varWhere = Null ' Main filter
[Code] .....
I have a query as follows :
SELECT tblCase.CaseId, tblCase.ReqReceived, tblCase.Letter_AMPI
FROM tblCase
WHERE (((tblCase.Letter_AMPI) Between #4/1/2014# And #3/31/2015#)) OR (((tblCase.ReqReceived) Between #4/1/2014# And #3/31/2015#))
ORDER BY tblCase.CaseId;
I am looking for all records where either the field Letter_AMPI or the field ReqReceived falls between the specified date range, EXCEPT as below.
However there are cases where first there is a date for Letter_AMPI and then a few weeks letter, we get a special request for the same case which is the ReqReceived date. So for example we may get a case which has an Letter_AMPI date of 01/01/2014 (not in the date range), but a ReqReceived date of 05/10/2014 (in the date range). So I need to be able to eliminate this record because if the Letter_AMPI does not fall in the date range, it should not appear in the results.
I know that it does not work because of the OR but I need the OR to pick up the other records.
I have 2 tables like this
TableA
FromDate
ToDate
BatchType
TotalBatches
TableB
Date
BatchType
NumBatches
Is their a way to update the TotalBatches in TableA with the sum of NumBatches from tableB that have the same BatchType and falls between the FromDate and ToDate of TableA?
I have a record in a table (Table1) with the following:
Item Start End
A 2012 2030
I have another table (Table2) with the following:
Item Start
A 2018
A 2025
What I would like to do is update/append Table1 so that it looks like the following:
Item Start End
A 2012 2017
A 2018 2024
A 2025 2030
I am looking to have entries made to the table based on a date range. I have a database of events and most repeat daily, weekly, etc. When I enter them into Access, they go in as a single entry with a start and end date. But I need to have them as individual entries for each day so that rather than one entry of 5 days, I need to create 5 entries of one day each.
View 5 Replies View RelatedI have the following project that works as a timesheet manager:
Users enter in a form the employee name/date/hours worked/role/overtime (yes or no)/rate... on a daily basis. At the end of every week, they must create a report depending on the dates given in a query.
I have only one table (tbl_EmployeeHours) and a query to calculate the number of hours between two dates.
At the moment a report gives me all the information above (employee name/date hours worked etc..) but what I am trying to is a bit different.
I need Access to create a report (based on a date range given by the user) that would give me: per unique name, the number of normal hours worked in total, next column, the number of hours worked as overtime (rate 1.5), then, the number of hours worked as overtime (rate 2).
This means there are 3 different totals. For example, in the date range given, someone might appear twice but in the report he will appear only once with 3 different totals...
My guess:
I would say I need to create a different query for the 3 different totals (normal hours, overtime 1.5 and overtime 2). For each query you would need to ask the user to input the date range (which would not be so user-friendly I agree...). Then, I am not sure how access would create that list of names and combine the 3 different results from the queries...?
I have 2tables,table1 id,name, table2 id,name,date.
How can i write a delete query that will delete everything in table2,if the data date is today?
Hello friends,
Thanks for having me.
I was wondering how I could select a date for a particular field in my main form. What I'm trying to do is this:
When I make a particular selection in one of my fields, I need to be able to specify a date that will be displayed on the main form, and also print on the report. I need to be able to select a specific date, and not a default date.
Hope this is clear, trying to keep it simple - which can be pretty complex.
Thanks for any input.
I have a database of personnel. People come and go all the time; however I can't have a personnel record deleted as soon as they leave. They remain on our books until a specified date for each individual. The date is different for each individual. I was hoping to have a field in their record with the date, and have a query or some code delete that record on the date in the field. Is this possible?
View 7 Replies View RelatedI have a table that stores price records with a field for the effective date but there is no field for the inactive date. How can I write a query to return the price for a date that falls between recorded effective dates?
Example: A record exists for 12/03/2005 and the next is 01/04/2005. How can I find the effective price on 18/04/2005?
Thanks
I was trying to run the front end on the 6th pc and this error "You cant go to the specific record. you maybe end of a recordset." showed up. But no such problem for the others.
why this is happening?
I have two tables. PreOrder and Order Tables. When our customer actually order a product, I want all information of that product to move from PreOrder table and append it to Order table. Currently, my user has to run an append query to add the record from PreOrder and add it to Order table. After that, she has to run a delete query to delete the record from PreOrder table. Since our query is setup to run by date, and order number..My user has to type the same thing twice. Is there anyone out there know the easy way? Thanks in advance..
View 1 Replies View RelatedI want to ask what is the code for Macro Builder in a command button if I want to open a report from the given value of inputbox. I made a command button to open a report but it will ask first the required value from inputbox I put. then it will open the report of specific record from the value I input in the inputbox.
View 3 Replies View Related