Date Calculation from two forms

M

msgulf

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?
 
J

Jeff Boyce

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top