date field calculation conditional on input from list box

F

Felicia R

I have a date field that is entered by user and a date field that needs to
calculate a future date (3 mths or 12 mths) based on input from user from a
drop down list box. I can get future date calculation to happen but I am
having trouble coming up with a conditional expression that would trigger the
date calculation to happen.
 
D

Dale Fye

How about using the afterupdate event of field bound to the listbox. Is the
listbox bound to a field? If so, then why do you need to have 3 fields when
2 will do. You would always be able to compute the future date based on the
date field entered and the value taken from the listbox.

If you go with this technique, you will also have to use the Current event
or just set the Control Source of your Future date textbox to something like:

ControlSource: = Dataadd("d", me.lstHowLong, me.txtDateField)

With this configuration, any time lstHowLong or txtDateField is updated, the
value in the future date field should get updated.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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