Basing field value on date in another field in Microsoft Access


I can't remember how to do this...The lower sub-form where the field MedNeccessityDate is highlighted in orange is based on a query which links a two queries together (qrydemoclients) and (DAclients). The field in the upper sub-form MedNeccessityDate is where the Med Neccessity is actually entered by the user, but I have that same field in the lower sub-form query so when it is entered in upper sub-form it automatically appears in lower sub-form in that field highlighted in orange. What I am trying to accomplish is this....In the lower subform, If the user selects DA is Needed - Yes, then I want the Date DA Needed field to automatically calculate to 14 days from the MedNecessityDate. If the Follow-up DA is Needed, then I want the Date Follow-up is Needed field to automatically calculate to 14 days from the MedNecessityDate. I think I have the whole MedNecessityDate set up wrong because I have tried putting that calculation on the After-Update of the orange field, but I'm thinking since I do not actually enter the data into that field, that is going to work. Can anyone help me with this code? Thanks.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If they will be select "DA is needed" and "Followup is needed" after entering the MedicalNecessity date then you can do the calculation in the AfterUpdate Event of those controls.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dale FyeCommented:
I agree with JimFive.  The code for that would look something like:

if me.[MedicalNecessityDate] & "" = "" Then
    'there is no date in MedicalNecessityDate
Elseif me.cbo_SomeControl = "DA is Needed" Then
    me.txt_Date_DA_Is_Needed = DateAdd("d", 14, me.[MedicalNecessityDate])
elseif me.cbo_SomeControl = "Followup is Needed" Then
    me.txt_Date_Followup_Is_Needed = DateAdd("d", 14, me.[MedicalNecessityDate])
manndoAuthor Commented:
After some changing on the code I got it to work. Thank you! Wasn't sure how to divide the points because I couldn't have done it correctly without the code but JimFive was right on the solution. If you want me to change it I will.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.