DateAdd

G

Guest

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])))
 
G

Guest

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])))
 
G

Guest

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])))
 

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