If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Calculating in table field
Hi.
I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#2
|
|||
|
|||
As answered alll the time in these newsgroups (did you try searching?) you
don't store calculated results in a table. It is redundnat and what happens if one of the values change? Search and read previous posts for more details. Rick B "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#3
|
|||
|
|||
Don't store age in a table!!
Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#4
|
|||
|
|||
ok ok Gotcha. Thanks.
I only wanted it there coz I am trying to set up a mail merge into word for a letter that will give the age of the person at the time of writing the letter. As far as I get it, you can only mail merge from tables and not forms. But that's another story. I promise to search more thoroughly before I ask about that one!! Thanks again. "Ed Warren" wrote in message ... Don't store age in a table!! Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#5
|
|||
|
|||
I would guess you can mail merge from a query.
"" wrote in message ... ok ok Gotcha. Thanks. I only wanted it there coz I am trying to set up a mail merge into word for a letter that will give the age of the person at the time of writing the letter. As far as I get it, you can only mail merge from tables and not forms. But that's another story. I promise to search more thoroughly before I ask about that one!! Thanks again. "Ed Warren" wrote in message ... Don't store age in a table!! Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#6
|
|||
|
|||
AaHaa! (the my lightbulb glimmers)
What you want to do is base your mail-merge on a query. Use date of birth to calcuate the age in the query (based on date of birth and sendingdate) and you have just what you want. You will want to function in a module CalcAge(passedDateOfBirth as Date/time, passedDateOfMailing as date) as integer Then in the query you will enter in one of the columns: Age:CalcAge([dateOfBirth],[DateOfMailing]) Ed Warren - "" wrote in message ... ok ok Gotcha. Thanks. I only wanted it there coz I am trying to set up a mail merge into word for a letter that will give the age of the person at the time of writing the letter. As far as I get it, you can only mail merge from tables and not forms. But that's another story. I promise to search more thoroughly before I ask about that one!! Thanks again. "Ed Warren" wrote in message ... Don't store age in a table!! Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#7
|
|||
|
|||
Personally, I would not make it that complex. I would just add a new column
to my query with... Age: DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")Format(Date( ),"mmdd")) "Ed Warren" wrote in message ... AaHaa! (the my lightbulb glimmers) What you want to do is base your mail-merge on a query. Use date of birth to calcuate the age in the query (based on date of birth and sendingdate) and you have just what you want. You will want to function in a module CalcAge(passedDateOfBirth as Date/time, passedDateOfMailing as date) as integer Then in the query you will enter in one of the columns: Age:CalcAge([dateOfBirth],[DateOfMailing]) Ed Warren - "" wrote in message ... ok ok Gotcha. Thanks. I only wanted it there coz I am trying to set up a mail merge into word for a letter that will give the age of the person at the time of writing the letter. As far as I get it, you can only mail merge from tables and not forms. But that's another story. I promise to search more thoroughly before I ask about that one!! Thanks again. "Ed Warren" wrote in message ... Don't store age in a table!! Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#8
|
|||
|
|||
Ok I'll experiment.
Thanks for all your help "Rick B" Anonymous wrote in message ... Personally, I would not make it that complex. I would just add a new column to my query with... Age: DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")Format(Date( ),"mmdd")) "Ed Warren" wrote in message ... AaHaa! (the my lightbulb glimmers) What you want to do is base your mail-merge on a query. Use date of birth to calcuate the age in the query (based on date of birth and sendingdate) and you have just what you want. You will want to function in a module CalcAge(passedDateOfBirth as Date/time, passedDateOfMailing as date) as integer Then in the query you will enter in one of the columns: Age:CalcAge([dateOfBirth],[DateOfMailing]) Ed Warren - "" wrote in message ... ok ok Gotcha. Thanks. I only wanted it there coz I am trying to set up a mail merge into word for a letter that will give the age of the person at the time of writing the letter. As far as I get it, you can only mail merge from tables and not forms. But that's another story. I promise to search more thoroughly before I ask about that one!! Thanks again. "Ed Warren" wrote in message ... Don't store age in a table!! Date of Birth is a constant Age is variable Use tables to store data (date of birth) Use forms to 'see data' and enter data. Ed Warren "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
#9
|
|||
|
|||
I had to do this in Excel then reimported the Table into Access.
Bruce "" wrote in message ... Hi. I've created a field in a form that calculates the age from the birthdate of the previous field. But I would like it to figure in the table. All the help info only tells you how to do it in a form. Can someone please tell me how to be able to do either have the table see the age from the form or how to put the format in the table field. Thanks J. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Seeking some expert advice. | HD87glide | Using Forms | 14 | March 23rd, 2005 10:11 PM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 04:11 AM |
Duplicate data | Rob Green | Database Design | 3 | November 7th, 2004 03:08 AM |
Access & OleDb - generating schema changes, problem with identity/counter fields. | Thomas Tomiczek [MVP] | Database Design | 9 | November 5th, 2004 10:32 AM |
COMPARE THE TWO TABLES | Stefanie | General Discussion | 0 | June 4th, 2004 04:36 PM |