Query: If Statement Format

C

Chuck

Good morning.

I am trying to add sql code to a query to determine if a field (Test01) is
null. If it is not null then I want to add 1 to a counter (TotPts). I will
then repeat the code for Test02...Test05. I keep getting a "missing
operator" message.

Thanks, I appreciate your help.
 
C

Chaim

Post your SQL.

Open your query in Design View, right click in the window and select SQL
View. Copy the SQL and paste it into a post to the news group.
 
C

Chuck

Here are two samples of code that would not compile:


if tbl_QOTWTutors.Test01 is null
begin
TotCnt = TotCnt + 1
end


if tbl_QOTWTutors.Test01 not = " "
begin
TotCnt = TotCnt + 1
end

I would appreciate any help. Thanks.
 

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