Date Problem

mugman17

Registered User.
Local time
Today, 19:02
Joined
Nov 17, 2000
Messages
110
I have a start date that gets automatically figure out when a combo box with Terms is selected. I want to have one of two option boxes get filled depending on the StartDate.

I tried this and it didn't work:

If Market = "2" and StartDate > "1/1/2004" then opt2004 = -1
If Market = "2" and StartDate < "12/31/2003" then opt2003 = -1

It seems to select opt2004 all the time. Even if the startdate is in 2003. I have this code in the On Change of the combo box.

Thanks
 
U could try just checking the year?

For example:

Code:
If Market = "2" then
    if Year(StartDate) = 2004 then 
        opt2004 = -1
        opt2003 = 0
    end if
    if Year(StartDate) = 2003 then 
        opt2003 = -1
        opt2004 = 0
    end if
end if
 
BTW, to answer your question, try:

If Market = "2" and StartDate > #1/1/2004# then opt2004 = -1
 

Users who are viewing this thread

Back
Top Bottom