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
|
|||
|
|||
Date Calculation from two forms
I have the date of birth on one form and the referral date on another. On
the form with the referral date, I want to calculate age at time of referral. Here's the expression I've tried in various places (in a SetValue macro, unbound control). DateDiff("yyyy",Forms![frmReferrals_Main]![DateofBirth],Forms![frmReferrals_Source]![ReferralDate])+Int(Format(Forms![frmlReferrals_Source]![ReferralDate],"mmdd")Format(Forms![frmReferrals_Main]![DateofBirth],"mmdd")) Am I missing something or can this not be done? |
#2
|
|||
|
|||
Date Calculation from two forms
Access forms display data, Access tables store data.
Is there a way you can pull the underlying data together into a query and do the calculation there? If you are using the expression you posted, what results are you getting? Syntax error messages? Incorrect calculations? ??? Regards Jeff Boyce Microsoft Office/Access MVP "msgulf" wrote in message ... I have the date of birth on one form and the referral date on another. On the form with the referral date, I want to calculate age at time of referral. Here's the expression I've tried in various places (in a SetValue macro, unbound control). DateDiff("yyyy",Forms![frmReferrals_Main]![DateofBirth],Forms![frmReferrals_Source]![ReferralDate])+Int(Format(Forms![frmlReferrals_Source]![ReferralDate],"mmdd")Format(Forms![frmReferrals_Main]![DateofBirth],"mmdd")) Am I missing something or can this not be done? |
Thread Tools | |
Display Modes | |
|
|