Happy New Years
Dec 31, 2004Happy New Years guys, all the best. hope the year will be good to us all.
View RepliesHappy New Years guys, all the best. hope the year will be good to us all.
View RepliesI am using the notinlist event to ask the user if they would like to add new info into the underlaying table. If they do, it opens the form based on the underlaying table.
My issue is i would really like to pass the contents of the combo box to the new form via openargs.
I have read many examples from this forums and tried them to no avail. I can pass the cbo contents to an unbound control but I want to pass it to the table for update.
Blah.
Thanks,
I have a table that lists computers I want to know the age of them for replacement purposes. I am using this function to populate a textbox on a form that updates my table. the results I am getting is a negative whole number I would like to get a positive number with one decimal place. so if computer was shipped September 24, 2010 my textbox would say 3.5 not -3
Here is my function
Code:
Private Sub Form_Load()
Dim theDate As Date
Dim age As Integer
theDate = Nz(Me.compDate.value, 0)
If theDate > 0 Then
age = DateDiff("yyyy", Now(), theDate)
Me.compAge = age
End If
End Sub
Hello mates, :cool:
I'm a bit confused with date codes. What I'm try to complish here is that how to add years and months from separate fields to text box, where's difference between two dates as an years and months? So basicly first I read year and month values from text boxes to a integer and then I'm going to add them to somewhere at last, but I'll get like 1 year and 14 months for result so, could you hit me with some tips or tricks what I should try out.
I'll approciate your time to help me out with this and thanks for advance. =P
Firstly, when designing tables, how can I format Date/Time to just the Year? I've tried syntax yyyy, but when I enter a year after opening the table, I get a type mismatch error.
Secondly, providing I have the correct custom format for Year, how can I enter the following dates?
1744-1745
Circa 1925
Before 1690
1800s
And would I be able to run queries on them, showing the dates in ascending order?
Any help would be much appreciated!
Hi,
I would like to be able to run a query that lists the number of years members have been subscribing (up to the current year).
i.e. to show the year he joined, and how many years he has been a member (shown as a number).
Is there a way to do this easily?
thanks
Adrian
I have atable the is storing ID, attendance_year and meeting code. Iw ould like to query the table and identify the IDs that have 10 consecutive attendance years no matter when it may have occured. So IDs have more than 10 row of data but not necassrily 10 years in a row.
How can I do this?
table looks like
123|2003|WIN03
123|2001|SUM02
456|2001|WIN01
456|2000|WIN00
456|2002|SPR02
456|2006|SUM06
How do I set up a query to sum data separately by year in the same row of data? I would like to see on one row a sum for year 2005 and also a separate field to sum for 2006.
Help me please!
EWJRichardson
I’m after some database advice. It will probably be something simple I can’t see for the wool…
I’m putting together a database that describes specifis small area geographies (Scottish Census output areas). For small area there will be various training category variables with associated counts and a general cost for all training in that geography. On its own this isn’t really a trouble but the database will grow over time with the same data (more or less) appearing each year to add to the database. I have a master geographical index that is used to aggregate small area data to higher areas so I could :-
- have a series of year based tables linked through the small area field and queried on a year look up basis.
- store each years data into the same table as the last and use a year identified to separate the records
- add new fields for all variables for each year across one table although once the number of fields reach 255 or so it would fall to bits.
I think the third is the worst option but I really would be grateful if anyone had any thoughts you could share with me on the best design approach to take.
Any help gratefully received!
Thanks...
Need some help figuring out the best way to handle this.
I have one table - tblEngineVolumes which has columns for each month Jan-Dec for the year 2005 with fields for each printer type.
Type Jan Feb Mar.....
PrinterA 100 50 300
PrinterB 500 25 250
I now have to figure out a way to have both 2005 and 2006 volumes for each printer.
My option so far is are below (there will never be any more than 2 years involved)
Type Jan 05 Jan 06 Feb 05 Feb 06
PrinterA 100 150 50 60
PrinterB 500 400 25 35
OR
Type Year Jan Feb
PrinterA 2005 100 50
PrinterA 2006 150 60
PrinterB 2005 500 25
PrinterB 2006 400 35
Would appreciate any thoughts/suggestions
Thanks,
Toni
Hi,
I have the following function:
Function GetFiscalYear(ByVal x As Variant)
If x < DateSerial(Year(x), FMonthStart, FDayStart) Then
GetFiscalYear = Year(x) - FYearOffset - 1
Else
GetFiscalYear = Year(x) - FYearOffset
End If
End Function
I call on the function in my query to determine the FiscalYear for a date.
Expr1: GetFiscalYear([ProdDate])
It sends back the correct Fiscal Year. However, when I try to put criteria in for Expr1 to show only Fiscal Year 2007 instead of all fiscal years, it gives me a data mismatch type error.
The [ProdDate] has the following formula:
Prod_Date: IIf([40Day]="True",DateAdd("d",-40,[Date Code]),DateAdd("d",-50,[Date Code])) where [40Day] returns True or False to determine if I should subtract 40 or 50 days from the Date Code. The Date Code is in the format ##/##/#### and is sometimes null.
I have tried everything I could think of and am completely stumped. Thanks in advance for any help!!!
Hi,
How do I query the last 2 years vs. current date?
Basically, I want to see the record from today date back to 2 years.
Please assist...
Thanks,
Isabel
Hi folks,
I want to populate a drop down combo box with a list of 10 years (current year +/- five years). I can enter them as a Value list but I don't want to have to update the list every year. Neither do I want to allocate a table to maintain a list.
Any ideas as to how I can auto populate the combo with a 10 yr span (5 previous and 5 next) and default to current year?
Thanks,
Dave
I hope someone will be able to help....
I have minimum year and maximum year value (for example 2006 is minimum & 2009 is maximum. How could I get a combo box to display all the years within the range of the minimum and maximum year (in this case, it should give me an option of 2006, 2007, 2008, 2009).
FYI - This database is used to track projects and each project has a commencement date and an estimated completion date. the minimum year is derived from the commencement date and the maximum date is derived from the estimated completion date. I am building a search form whereby the year selected in the combo box should display all the projects commencing, continuing, and ending that year.
Pls help...
Thanks in advance.
jan :confused:
I need a formula or a function that will return a person's age in years and months. All the functions and formulas that I have seen to date and that I have used only calculate a person's age in years. Can anyone help?
View 2 Replies View RelatedFriends,
I have a form with four fields, date1, date2, date3 and date 4.
These have all a mm/dd/yyyy format.
I need to add an unbound control which will count in months and years the difference between the dates.
Ex.
date1: 01/01/1970
date2: 05/05/1980
date3: 06/06/1990
date4: 06/30/2001
Fields date3 and date4 may be blank, therefore the code should consider only counting the first two.
Thanks for any help.
Hi,
i have a displayed(textbox) birthdate (txtDoB) and a textbox "input_date" (txtInputDate) inside form "form Two".
how do i calculate the years and months difference upon clicking the "OK" command button at "form Two"?
the result of the years and months will be displayed at a textbox (txtResult) at a form called "form Result".
thank you.
I have a burron to run a query that auto populates 'start time' with NOW().
It has worked for 3 years and now I get an error message see attached. The only thing I did was change the program fromm 2000 to 2002.
any and all suggestions welcome.
Thanks
Hello,
I am building a Db that will report against individual transactions. Each transaction will be on a specific day.
Now I will need to slice and dice the data in a number of different ways depending on what the end user wants to see.
Therefore I need to build a date table that will aggregate all the individual days by Week, Month, calendar year, fiscal year...etc.
Being a rookie, I was simply going to build a table that has all the days for the last three years and then the corresponding weeks, months etc in columns to the right.
Because of this design, I will have over 1,000 records. Could I do it differently to keep the size of the table down?
For example use ranges as a cell value (Our week 1 is named "Feb 1st Wk", it is 1/30/06-2/5/06 for fiscal Yr 2006, 1/31/04-2/6/05 for fiscal Yr 2005...etc)
Any advice on this?
Thanks, Paul
hi, i want to calculate how long each person has worked at a company.
i am using access 97.
would i be able to enter something in the criteria that would work this out for me?
something like year([START DATE]) - year(Now())
this does not work but i want to find out the number of years a person has worked for the company from the field START DATE .
thanks for you help.
I have a database that I am using to report metrics based on seasonally available data. What I am running into is the problem that the seasonally entered data doesn't start on the same date every year.
An example:
I have data that was entered into my database last year starting July 26, 2004. This is considered part of week 1 of my season and I want to compare that data to records that started being entered on August 15, 2005. Which is week 1 of the 2005 season.
Records include the following information: id, date, other irrelevant details
Does anyone have any ideas on how I might be able to accomplish this? Thanks in advance for your help!
I have a table with these 2 fields: Name and AnniversaryDate. What is the best way to write a query that will show me all the anniversaries that will fall within the next two weeks?
For instance if I have a record with these values:
Name, Anniversary
BukHix, 1/1/2003
I want the query to look at today’s date, which in this case would be 12/29/2005 go two weeks forward, which would make it 1/12/2006 and show any anniversary date that would fall between the dates.
The catch (and the part that is throwing me off) is how do I do that without explicitly naming the year? I mean I need to catch every date in that range from 1965 to Current year - 1.
Any ideas?
I have a form that I'd like to place a date onto, after entering a from date and a to date. What I'd like to see on the form, after entering my two specified dates, is:
"You have xx years, yy months and zz day left on your timeline." where xx is the number of years, yy the number of months andzz the number of days.
If I entered dates of say, 01/01/01 for my from date and 12/31/06 as my to date, how can I accomplish something like what I want?
Thank you so much in advance! I'm looking forward to your suggestions!!!!
I'm trying to calculate the amount of years employed in a query and I keep getting "Data Type Mismatch in criteria expression".
I'm putting the expression in the YearsOfService Field that I've created that I would for the total in years to populate.
Here's the field expression:
DateDiff("yyyy",[EmpHireDate],Date())+(Date()<DateSerial(Year(Date()),Month([EmpHireDate]),Day([EmpHireDate])))
Thanks for any help...
FYI EmpHireDate is a Date/Time Field and YearsOfService is a Number field
Thanks for any help...
i am calculating an age from (Birthdate - date())/365.25 and this works fine except it gives me a value which has a decimal place (ie 6.7 years old). How can i convert it to 6 years and so many months?
View 5 Replies View RelatedI am looking to track the salary information for my small firm over a number of years. Does it make sense to create a table with multiple fields that would be structured like this (2011401(k), 2011Medical, 2011 LifeInsurance, 2012401(k), 2012Medical, 2012LifeInsurance, etc) or is there a better way to tackle this?
View 14 Replies View Related