if..end if problem

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
 
G

Guest

It appears to be working as coded. You coded the
statement for any date greater > then 01/01/2004.
 
D

Dirk Goldgar

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.
 
R

Rick Allison

Bob,

Try putting your date in pound signs #01/01/2004#.

Access likes that better.

Rick
 
Y

yvonneb

You can try the DateDiff function - subtracts 2 dates - check help for syntax.

Good Luck!

yvonneb
 

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