if..end if problem

  • Thread starter Thread starter bob
  • Start date Start date
B

bob

I am writing this code for this program which does
reimburses employees per their grades...I am using this
code....MY problem..it seems to work fine for the 2004
year but for the class start dates before 2004 like
08/08/2003..it does not work right. Where Am i Making the
mistake. below is the code I am using.


If Me![Class Start Date] > "01/01/2004" Then

If Me![Final Grade] = "B" Then
Percent = "90%"

Else

If Me![Final Grade] = "A" Then
Percent = "70%"

End if
 
It appears to be working as coded. You coded the
statement for any date greater > then 01/01/2004.
 
bob said:
I am writing this code for this program which does
reimburses employees per their grades...I am using this
code....MY problem..it seems to work fine for the 2004
year but for the class start dates before 2004 like
08/08/2003..it does not work right. Where Am i Making the
mistake. below is the code I am using.


If Me![Class Start Date] > "01/01/2004" Then

If Me![Final Grade] = "B" Then
Percent = "90%"

Else

If Me![Final Grade] = "A" Then
Percent = "70%"

End if

Answered in a different newsgroup to which you also, independently,
posted this question. That's called "multiposting", and it's generally
frowned on because others don't know what answers have already been
given, and so they duplicate the effort. Also it's harder for you to
keep track of the various replies, and it's harder for later readers of
the question, who may be looking for the same answer, to learn what they
need.

In most cases a single, well-chosen newsgroup will do. If your question
really is relevant to more than one newsgroup, the approved technique is
to "crosspost" it instead, by listing multiple newsgroups in the To: or
Newsgroups: line of a single message. If you do that, the message and
any replies will appear in all the listed newsgroups automatically,
which is beneficial to all concerned.
 
You can try the DateDiff function - subtracts 2 dates - check help for syntax.

Good Luck!

yvonneb
 
Back
Top