DateAdd

A

Amin

I have an invoice report, I need to add unbound textbox to calculate the date
added to [InvDate] to determine the coverage end date
o If the [PaymentOption] = “1 Month†then [unbound textbox] will be 1 month
after [InvDate]
o If the [PaymentOption] = “3 Month†then [unbound textbox] will be 4 month
after [InvDate]
o If the [PaymentOption] = “9 Month†then [unbound textbox] will be 12 month
after [InvDate]

Thanks
 
F

fredg

I have an invoice report, I need to add unbound textbox to calculate the date
added to [InvDate] to determine the coverage end date
o If the [PaymentOption] = ´1 Month¡ then [unbound textbox] will be 1 month
after [InvDate]
o If the [PaymentOption] = ´3 Month¡ then [unbound textbox] will be 4 month
after [InvDate]
o If the [PaymentOption] = ´9 Month¡ then [unbound textbox] will be 12 month
after [InvDate]

Thanks

What is [PaymentOption]?
is it an opton Group?
If so, what are the possible number values returned? 1, 2, 3?

=IIf([PaymentOption] = 1, DateAdd("m",1,[InvDate]),
IIf([PaymentOption]=2, DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))

Is it a Combo Box?
Is the datatype Text?
=IIf([PaymentOption] = "1 Month", DateAdd("m",1,[InvDate]),
IIf([PaymentOption]="3 Month", DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))
 
A

Amin

PaymentOption is a text box

fredg said:
I have an invoice report, I need to add unbound textbox to calculate the date
added to [InvDate] to determine the coverage end date
o If the [PaymentOption] = “1 Month†then [unbound textbox] will be 1 month
after [InvDate]
o If the [PaymentOption] = “3 Month†then [unbound textbox] will be 4 month
after [InvDate]
o If the [PaymentOption] = “9 Month†then [unbound textbox] will be 12 month
after [InvDate]

Thanks

What is [PaymentOption]?
is it an opton Group?
If so, what are the possible number values returned? 1, 2, 3?

=IIf([PaymentOption] = 1, DateAdd("m",1,[InvDate]),
IIf([PaymentOption]=2, DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))

Is it a Combo Box?
Is the datatype Text?
=IIf([PaymentOption] = "1 Month", DateAdd("m",1,[InvDate]),
IIf([PaymentOption]="3 Month", DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))
 
A

Amin

Thanks fredg

fredg said:
I have an invoice report, I need to add unbound textbox to calculate the date
added to [InvDate] to determine the coverage end date
o If the [PaymentOption] = “1 Month†then [unbound textbox] will be 1 month
after [InvDate]
o If the [PaymentOption] = “3 Month†then [unbound textbox] will be 4 month
after [InvDate]
o If the [PaymentOption] = “9 Month†then [unbound textbox] will be 12 month
after [InvDate]

Thanks

What is [PaymentOption]?
is it an opton Group?
If so, what are the possible number values returned? 1, 2, 3?

=IIf([PaymentOption] = 1, DateAdd("m",1,[InvDate]),
IIf([PaymentOption]=2, DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))

Is it a Combo Box?
Is the datatype Text?
=IIf([PaymentOption] = "1 Month", DateAdd("m",1,[InvDate]),
IIf([PaymentOption]="3 Month", DateAdd("m",4,[InvDate]),
DateAdd("m",12,[InvDate])))
 
Top