So what do I want to achieve?
I have a form frmHardwareEntry based on a query qryHardwareEntry which in turn is based on a table tblHardware.
I have a field in table hardware 'Date Purchased'.
Within the frmHardwareEntry I would like to add a field(s) 'Warranty' & 'Warranty Expirary Date'. So user enters date purchased, the manufacturers warranty period (1,2,3,4 or 5 years) then 'Warranty Expirary Date' auto populates...ooohh and an additional field that counts down the remaining time......'Warranty Expirary Date minus Date()'?
Advice warmly received. The DB is intended for the forum for others to make use of (currently on version 999!!!!). Will post when ironed out license allocation issue in the mean time thought the above would be a nice inclusion!
Thanks,
Phil.
I create a database through ms access and there have a birth date box and admission date. Another box for Age.I want to see the age in month or year figure in to the age box when I go next field. Which will be calculate from admission date to birth date.
I have a database which stores information relating to club members, which I'm in the middle of giving a bit of a facelift and one thing I want to automate is the calculation of the expiry date.
My memberships expire annually at the end of December and the expiry date is set as a default value within the table properties. This has to be manually changed every September (every new member from then pays for 15 months) to the following December.
Is there a formula I can insert in the defaul value field that will return December the current year if todays date is between January and August, and December next year if todays date is between September and December?
I am using the following expression to calculate a completion date for a project which is based on the due date. My problem that I am running into is when I get to a project that is due on a Tuesday, it returns a date for Sunday when it should be Friday.
What's the formula we can use to calculate days between no of days between date job is open and today's date in a query. I am using formulat below formula but the DATE_OPEN and Today (todays date) pops us as enter parameter value. I dont want those enter parameter windows pops us. The date job is open is in a linked table and linked table is getting the information from BPCS software. The date in Liinked is in format YYYYMMDD.
Total Days: DateDiff("d",[Date_Open],[Today])
The SQL Details are below. AUNPRDF_AAA802 is a linked table and information gets updated on 12 am everyday
SELECT DateDiff("d",[Date_Open],[Today]) AS [Total Days], AUNPRDF_AAA802.AAAGE AS Age, AUNPRDF_AAA802.AAORD AS [Job Number], AUNPRDF_AAA802.AAWKSP AS Workshop, AUNPRDF_AAA802.AASWKT AS WorkType, AUNPRDF_AAA802.AANAME AS [Customer Name], AUNPRDF_AAA802.AANME AS [Service Admin], AUNPRDF_AAA802.AASDE1 AS Complaint,
I track my daily work in an access data base. very simple. each day I enter the date, activity, the person I was helping, and a value ie. 1.5 hours etc.
I might work on the same project many times that week, i.e. 1.5 hours on Monday, .5 hours on Tuesday, and 1.0 on thursday.
my new boss wants a weekly summary. so I need to create a query that would show the total for this activity 3.0 hours for that week. So basically at the end of the year, I would have a query with activities by row, weeks across the top i.e. 52 columns, and the total of the various activities summed up for each week.
I looked at all the standard date functions, and did not find a weekend type functions.
Hi All. In my employee's table I have EmployeeName, Rate, Date and I need create query to calculate Rate for each eployee between Date if ration during this period of time was diferent. Thanks.
Hi All. I try to generate a report which calculate subtotal for patient AMOUNT for current year and total for whole period from first visit to current date. The result of subtotal =Sum(IIf(Year(Date()=[VisitYr]),[Amount])) is the same like total. What is a correct way? Thanks.
Can someone tell me how to calculate a future date in a bound field on a form? The form includes "date created", "life expectancy" and "review date" fields, all bound to the same table. I want the "review date" to be calculated by adding the "life expectancy" (number field, in days) to the "date created" field. I found some posts that were similar but none using bound fields.
Thanx so much for you help with this...I've spent quite a lot of time trying to come-up with a solution...to no avail.
I have a form (frm_Active) that reads from a query (qry_Active) based on a table (tbl_Data). The form/query/table has the following fields:
EVENT DATE START_DATE REVIEW_DATE APPROVED_DATE POST-REVIEW_DATE
When I add a new record, I would like for the default dates to be populated based on the EVENT_DATE. For example, if I enter 1/1/2006 for the EVENT_DATE, I want the
START_DATE = +7 days REVIEW_DATE = +55 days APPROVED_DATE = +60 days POST-REVIEW_DATE +180 days
I tried to do this in the table as the "default value" and it would not accept it. I don't think I can do this in the query because the query is basically displaying the table and I want to be able to manually enter a different date if needed so it will be stored in the table. I tried this on the form in the "Default Value" field, but it is just blank when I enter a new record and enter the EVENT_DATE. However I am not sure I am entering the formula correct. Can someone tell me what is the best way of doing this and what the correct formula is?
I am trying to calculate when the next test date is. It is 10 years from the last test but not until the end of whatever year it is in.So if the date is 5/1/02 then the next test is not due until 12/31/12. I have used this code
I have a drop down box in my access database which I want to use to give completion dates to jobs, the drop down has three values:
Emergency Urgent Routine
emergency equates to 1 day Urgent 7days Routine 28days
I have had a dig in the help files and I can get the order completion date to show the terms emrgency, urgent and routine, however I nned to calculate the date, not just show the term, this where I lose track of how to get any further, I have searched the forum and cannot find an example, but perhaps I am not using the right search criteria, I have tried date calculation on drop down results etc etc and no dice, I am sorry if I am posting a question whichg has already been answered, and if anyone can post a link to a solution that would be great to.
Many thanks for your help this is my first post on this forum, but I am sure I will be here for a long tme to come access is fast becoming my life :D
again many thanks for taking the time to read this and I appreciate any help you can give me.
I have a drop down box in my access database which I want to use to give completion dates to jobs, the drop down has three values:
Emergency Urgent Routine
emergency equates to 1 day Urgent 7days Routine 28days
I have had a dig in the help files and I can get the order completion date to show the terms emrgency, urgent and routine, however I need to calculate the date, not just show the term, this where I lose track of how to get any further, I have searched the forum and cannot find an example, but perhaps I am not using the right search criteria, I have tried date calculation on drop down results etc etc and no dice, I am sorry if I am posting a question whichg has already been answered, and if anyone can post a link to a solution that would be great to.
Many thanks for your help this is my first post on this forum, but I am sure I will be here for a long tme to come access is fast becoming my life :D
again many thanks for taking the time to read this and I appreciate any help you can give me.
This is my first post to this group. I am building a database for a charity event and need to calculate the age of a person based on the Date Of Birth field in the table and add that number to a separate column in the table. Also, need to calculate the age as of a certain date (the beginning of the event). Thank you for any help.
I have a query that has 11 dates on it, I am trying with iif statements to get it down to one column reflecting the most recent date out of the 11, for example 5/2/14 and 4/9/14, I would want to have 5/2/14. The problem with this is that most of the cells are empty and and I can't calculate empty date cells. my thought was to create a statement that goes something like this iif([Date1]="", "1", [date1]), obviously this does not work but I would like for it to show something other then nothing so that I can calculate on it.
I have this code for calculating the age from birthdate but i want if there is years no months or days appear
Public Function CalcAge(Birthdate As Date) As String Dim intYears As Integer, intMonths As Integer, intDays As Integer intMonths = DateDiff("m", Birthdate, Date) intDays = DateDiff("d", DateAdd("m", intMonths, Birthdate), Date)
Each person have an employment date on which a 3 year cycle is based.
So at the end of their 3 years the cycle needs to update to the next 3 year cycle.
For example Person Employment date Cycle Start 1 01 Jan 2015 01 Jan 2015 2 01 Jan 2006 01 Jan 2012
In the case of Person 2 above the cycle would have started at 2006 - 2009 and then moved to 2009 - 2012 and then 2012 - 2015 and now 2015 - 2018
I have the following formula at the moment but need to make 100% I'm not missing something.
Also - would it be fine to run the update query each time for all persons or must it be only for the ones where the current date does not fall within the current 3 year cycle?
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 .
I want to select a date range from "Production" table where it agrees to the Dept_ID too. And then calculate the summation of the columns "hours", "produced" & "waste" of that particular range selection.
This is my code:
Code: Option Compare Database Private Sub cmdCal_Click() Dim sql As String Dim rs As Recordset Dim qdef As DAO.QueryDef Dim hours, waste, produced As Integer
[code]....
But it returns nothing, When i remove the errorHandler, it says that no records were found.