|
|
I have a database with a field called Birthdate. I want to insert a unbound field in a Form with a macro(module) with the coding for years, months, and days. How is it writtern and how do you implement it. I have been trying for days. This is all new to me.
|
|
On Mon, 15 Dec 2008 08:55:01 -0800, MRKaye wrote:
[Quoted Text] > I have a database with a field called Birthdate. I want to insert a unbound > field in a Form with a macro(module) with the coding for years, months, and > days. How is it writtern and how do you implement it. I have been trying for > days. This is all new to me.
It's not clear what it is you wish. Assume the birthdate is June 12, 1967. Do you wish to show the year, month, and day of the birthdate, i.e. 1967, June, 12? Or do you wish to show the person's current age as 41 years 6 months 3 days?
-- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|
|
"fredg" wrote:
[Quoted Text] > On Mon, 15 Dec 2008 08:55:01 -0800, MRKaye wrote: > > > I have a database with a field called Birthdate. I want to insert a unbound > > field in a Form with a macro(module) with the coding for years, months, and > > days. How is it writtern and how do you implement it. I have been trying for > > days. This is all new to me. > > > It's not clear what it is you wish. > Assume the birthdate is June 12, 1967. > Do you wish to show the year, month, and day of the birthdate, i.e. > 1967, June, 12? > Or do you wish to show the person's current age as > 41 years 6 months 3 days? > > -- > Fred > Please respond only to this newsgroup. > I do not reply to personal e-mail >
|
|
I wish to show the person's current age as 41 years 6 months 3 days?
"fredg" wrote:
[Quoted Text] > On Mon, 15 Dec 2008 08:55:01 -0800, MRKaye wrote: > > > I have a database with a field called Birthdate. I want to insert a unbound > > field in a Form with a macro(module) with the coding for years, months, and > > days. How is it writtern and how do you implement it. I have been trying for > > days. This is all new to me. > > > It's not clear what it is you wish. > Assume the birthdate is June 12, 1967. > Do you wish to show the year, month, and day of the birthdate, i.e. > 1967, June, 12? > Or do you wish to show the person's current age as > 41 years 6 months 3 days? > > -- > Fred > Please respond only to this newsgroup. > I do not reply to personal e-mail >
|
|
On Mon, 15 Dec 2008 10:50:00 -0800, MRKaye wrote:
[Quoted Text] > I wish to show the person's current age as > 41 years 6 months 3 days? > > "fredg" wrote: > >> On Mon, 15 Dec 2008 08:55:01 -0800, MRKaye wrote: >> >>> I have a database with a field called Birthdate. I want to insert a unbound >>> field in a Form with a macro(module) with the coding for years, months, and >>> days. How is it writtern and how do you implement it. I have been trying for >>> days. This is all new to me. >> >> It's not clear what it is you wish. >> Assume the birthdate is June 12, 1967. >> Do you wish to show the year, month, and day of the birthdate, i.e. >> 1967, June, 12? >> Or do you wish to show the person's current age as >> 41 years 6 months 3 days? >> >> -- >> Fred >> Please respond only to this newsgroup. >> I do not reply to personal e-mail >>
See: http://www.accessmvp.com/djsteele/Diff2Dates.html
After copying and pasting the Diff2Dates function into a code module, as the control source of an unbound control, write:
=Diff2Dates("ymd",[Birthdate],Date())
-- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|
|
Thank you so much, mrkaye "fredg" wrote:
[Quoted Text] > On Mon, 15 Dec 2008 10:50:00 -0800, MRKaye wrote: > > > I wish to show the person's current age as > > 41 years 6 months 3 days? > > > > "fredg" wrote: > > > >> On Mon, 15 Dec 2008 08:55:01 -0800, MRKaye wrote: > >> > >>> I have a database with a field called Birthdate. I want to insert a unbound > >>> field in a Form with a macro(module) with the coding for years, months, and > >>> days. How is it writtern and how do you implement it. I have been trying for > >>> days. This is all new to me. > >> > >> It's not clear what it is you wish. > >> Assume the birthdate is June 12, 1967. > >> Do you wish to show the year, month, and day of the birthdate, i.e. > >> 1967, June, 12? > >> Or do you wish to show the person's current age as > >> 41 years 6 months 3 days? > >> > >> -- > >> Fred > >> Please respond only to this newsgroup. > >> I do not reply to personal e-mail > >> > > See: > http://www.accessmvp.com/djsteele/Diff2Dates.html> > After copying and pasting the Diff2Dates function into a code module, > as the control source of an unbound control, write: > > =Diff2Dates("ymd",[Birthdate],Date()) > > -- > Fred > Please respond only to this newsgroup. > I do not reply to personal e-mail >
|
|
|