Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2005

Tip: Looking for answers? Try searching our database.

calculating age from DOB and adding to table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rachel_a - 28 Dec 2005 23:13 GMT
I have a form that calculates age when you enter the DOB. Everything I
enter on the form gets input in the table. However, the age doesn't get
input. How can I get it to input the age? I know I'm being vague, but I
don't know how else to explain it. Please help.

Thanks
Anton - 28 Dec 2005 23:28 GMT
Hi Rachel,

Is the control you are using to display the returned calculated date
bound to a field in the table in which the other data on the form is
stored? There might be a slight issue with saving this information in
your table as the data will represent the age at the time when the
record was created (and therefore would remain static) unless changed.
You may want it to do this...or you may not. Another alternative would
be to recalculate the age each time you wish to view the age in order
to show the persons age each time you view it. Hope this helps...will
check back to see how you go :)

Anton
Larry Linson - 28 Dec 2005 23:37 GMT
>I have a form that calculates age when you enter the DOB. Everything I
> enter on the form gets input in the table. However, the age doesn't get
> input. How can I get it to input the age? I know I'm being vague, but I
> don't know how else to explain it. Please help.

It is not a good idea to store a value that you can calculate in a query,
form, report, or VBA code when you need it. If you have a need to store "the
person's age when data about him/her was first entered", it would be valid.
In that case, use VBA code to copy the calculated value into a Text Box that
is bound to the appropriate Field in the Record Source.

If it just represents the person's age, that will change over time... and
can always be calculated from the saved DOB.

 Larry Linson
 Microsoft Access MVP
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.