Discussion Locked

What's wrong with this Access 97 formula

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The following formula is giving me this weird symbol that looks kind of like a 3 character word, "TO*" (the * represents a character that looks like Gamma in the greek alphabet)

=DCount("[Survey Number]","Survey Results"," [Weekend Retreat] =B")

I tried putting another set of quotes around the B, thinking maybe it was due to the answer being alpha rather than numeric. I got an error message about an invalid syntax. This formula has worked for all the numeric controls in the form. This field will contain a "B" for best, or a "W" for worst. Any help would be appreciated. Feel free to e-mail me directly if you need more info. I have the feeling I'm missing something easy.

4 replies

by larry h.

Add single quotes around the B like this:
=DCount("[Survey Number]","Survey Results"," [Weekend Retreat] = 'B' ")

by kw

Correct:

=DCount("[Survey Number]","[Survey Results]",[Weekend Retreat]=' & "B" & "'")

This discussion is closed to new replies.