M
Matt_F
Hi Everyone,
I'm hoping someone can help me with a problem that is really bugging me. I
have a form that contains a date field called dDate (Date format) and another
field called fyYear (Number format). What I want to happen is for a person to
enter a date (ex. 6/1/2009) and have the fyYear field auto-populate with
either the current year or the next year depeding on where the dDate value
falls.
I'm bascially trying to create a if then statement using VB that looks
something like this
If dDate => "1/1/" & Year(Date) and dDate =< "6/30/"&Year(Date) Then
fyYear = Year(Date)
Else fyYear = Year(Date) +1
End If
I'm not quite sure what is going on but I think it has something to do with
the use of the Year function and my predefined month and day numbers. It
basically just skips to the Else part of the statement. Thank you in advance
and any help would be greatly appreciated.
Matt
I'm hoping someone can help me with a problem that is really bugging me. I
have a form that contains a date field called dDate (Date format) and another
field called fyYear (Number format). What I want to happen is for a person to
enter a date (ex. 6/1/2009) and have the fyYear field auto-populate with
either the current year or the next year depeding on where the dDate value
falls.
I'm bascially trying to create a if then statement using VB that looks
something like this
If dDate => "1/1/" & Year(Date) and dDate =< "6/30/"&Year(Date) Then
fyYear = Year(Date)
Else fyYear = Year(Date) +1
End If
I'm not quite sure what is going on but I think it has something to do with
the use of the Year function and my predefined month and day numbers. It
basically just skips to the Else part of the statement. Thank you in advance
and any help would be greatly appreciated.
Matt