help with syntax please!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In 2002, my query has two "hours" fields: Hours Offered Hours Used. I only
want one kind of hours shown for each record.

I'm trying to use the criteria so that if the Hours Offered=0, the Hours
Used will be actual hours used, but if the Hours Offered>0, the Hours Used
will be 0.

I'm using an IF statement under the Hours field as follows:

=IIF([Offered Hours]=0,[Hours],0)

I keep getting an error message that my syntax is wrong or it's too complex
(HA!)

Any help would be hugely appreciated. Thanks.
 
In a query, you would rarely (if ever) use the equal sign.

You should have something more like...


HoursToPrint: IF([Offered Hours]=0,[Hours],0)
 
Thanks for your speedy response, Rick.

Not to be too dense, but where would I put that HourstoPrint command?

Thanks so much,

Nomi

Rick B said:
In a query, you would rarely (if ever) use the equal sign.

You should have something more like...


HoursToPrint: IF([Offered Hours]=0,[Hours],0)


--
Rick B



Nomiballou said:
In 2002, my query has two "hours" fields: Hours Offered Hours Used. I only
want one kind of hours shown for each record.

I'm trying to use the criteria so that if the Hours Offered=0, the Hours
Used will be actual hours used, but if the Hours Offered>0, the Hours Used
will be 0.

I'm using an IF statement under the Hours field as follows:

=IIF([Offered Hours]=0,[Hours],0)

I keep getting an error message that my syntax is wrong or it's too complex
(HA!)

Any help would be hugely appreciated. Thanks.
 
It becomes a field in your query. You'd use it as you would any other field
in a report or form.

--
Rick B



Nomiballou said:
Thanks for your speedy response, Rick.

Not to be too dense, but where would I put that HourstoPrint command?

Thanks so much,

Nomi

Rick B said:
In a query, you would rarely (if ever) use the equal sign.

You should have something more like...


HoursToPrint: IF([Offered Hours]=0,[Hours],0)


--
Rick B



Nomiballou said:
In 2002, my query has two "hours" fields: Hours Offered Hours Used.
I
only
want one kind of hours shown for each record.

I'm trying to use the criteria so that if the Hours Offered=0, the Hours
Used will be actual hours used, but if the Hours Offered>0, the Hours Used
will be 0.

I'm using an IF statement under the Hours field as follows:

=IIF([Offered Hours]=0,[Hours],0)

I keep getting an error message that my syntax is wrong or it's too complex
(HA!)

Any help would be hugely appreciated. Thanks.
 
It actually worked! Thank you SO much!!!

Nomi

Rick B said:
It becomes a field in your query. You'd use it as you would any other field
in a report or form.

--
Rick B



Nomiballou said:
Thanks for your speedy response, Rick.

Not to be too dense, but where would I put that HourstoPrint command?

Thanks so much,

Nomi

Rick B said:
In a query, you would rarely (if ever) use the equal sign.

You should have something more like...


HoursToPrint: IF([Offered Hours]=0,[Hours],0)


--
Rick B



In 2002, my query has two "hours" fields: Hours Offered Hours Used. I
only
want one kind of hours shown for each record.

I'm trying to use the criteria so that if the Hours Offered=0, the Hours
Used will be actual hours used, but if the Hours Offered>0, the Hours Used
will be 0.

I'm using an IF statement under the Hours field as follows:

=IIF([Offered Hours]=0,[Hours],0)

I keep getting an error message that my syntax is wrong or it's too
complex
(HA!)

Any help would be hugely appreciated. 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

Similar Threads


Back
Top