Set a date depending on a choice from a combo box / option buttons

Ciaran89

New member
Local time
Today, 08:18
Joined
Feb 2, 2015
Messages
5
Hi,

I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.

The variables are 'Payment in 30 days" " Payment upfront"

if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date
if "payment upfront" is selected the field on the form will enter todays date.

This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.

I've tried a few different ways to enter this but i can't quite get it to work as i want.
I hope someone can help me with this.

Thanks.

Ciaran
 
Why don't you post your failing effort and we'll fix it? You can use Select/Case or If/ElseIf.
 
I'll take a stab in the dark.

Assuming a combo is used, put the following in the combo afterUpdate event.

Code:
if me.cboChoice ="Payment in 30 days" then
   me.txtDateField = Date +30
else
   me.txtDateField = Date
endif
 
Thanks for the response.

I actually used something similar to Cronk's suggestion and have it working how I want now.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom