Check Box and Expression Building

G

Guest

I'm trying to build an expression in Access 97 and need some help. I believe
that it will be an IIf statement. If a checkbox field within a given table
is checked, then the text "FREIGHT INCLUDED" will be inserted. If the
checkbox field of this same table is not checked, then no text will be
inserted. The expression I'm building is in a query titled ItemDetail. The
table is titled QuotationHeader and the checkbox field within this table is
named FreightIncl.

Any suggestions?
 
A

Allen Browne

Try typing this into the Field row in your query:
IIf([FreightIncl], "Freight Included", Null)
 
G

Guest

Still having problems...

I tried this as well and I'm still not getting the actual results I want.

FrtInclStmt: IIf([QuotationHeader]![FreightIncl]=True,"Freight Included","")

Both expressions bring up a parameter value box and if you enter "True" or
"1" then it will pull in the desired text.

What I'm trying to do if create an expression that will look at the table
and field inidcated above (which is a check box) and determine if the box is
checked it will return the text "Freight Included". If the check box is not
checked, then it will return no text.

Any ideas????

Thanks a bunch!
-Sharon

Allen Browne said:
Try typing this into the Field row in your query:
IIf([FreightIncl], "Freight Included", Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Burquez731 said:
I'm trying to build an expression in Access 97 and need some help. I
believe
that it will be an IIf statement. If a checkbox field within a given
table
is checked, then the text "FREIGHT INCLUDED" will be inserted. If the
checkbox field of this same table is not checked, then no text will be
inserted. The expression I'm building is in a query titled ItemDetail.
The
table is titled QuotationHeader and the checkbox field within this table
is
named FreightIncl.

Any suggestions?
 
A

Allen Browne

Are you sure you have the names right? For example, there's not a space in
the table or field name?

What exactly is being asked for in the title of the parameter box?

If you still can't see the anomaly, wwitch the query to SQL View (View menu,
from query design). Copy the SQL statement, and paste here as a followup.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Burquez731 said:
Still having problems...

I tried this as well and I'm still not getting the actual results I want.

FrtInclStmt: IIf([QuotationHeader]![FreightIncl]=True,"Freight
Included","")

Both expressions bring up a parameter value box and if you enter "True" or
"1" then it will pull in the desired text.

What I'm trying to do if create an expression that will look at the table
and field inidcated above (which is a check box) and determine if the box
is
checked it will return the text "Freight Included". If the check box is
not
checked, then it will return no text.

Any ideas????

Thanks a bunch!
-Sharon

Allen Browne said:
Try typing this into the Field row in your query:
IIf([FreightIncl], "Freight Included", Null)


Burquez731 said:
I'm trying to build an expression in Access 97 and need some help. I
believe
that it will be an IIf statement. If a checkbox field within a given
table
is checked, then the text "FREIGHT INCLUDED" will be inserted. If the
checkbox field of this same table is not checked, then no text will be
inserted. The expression I'm building is in a query titled ItemDetail.
The
table is titled QuotationHeader and the checkbox field within this
table
is
named FreightIncl.

Any suggestions?
 
G

Guest

I double checked the names. The table name is "QuotationHeader" and the
field name is "FreightIncl" and it is a data type format Yes/No.

The parameter box says...
Enter Parameter Value
QuotationHeader!FreightIncl

Here's the SQL statment...
IIf([QuotationHeader]![FreightIncl]=Yes,"Freight Included","") AS FrtInclStmt

Thanks,
Sharon




Allen Browne said:
Are you sure you have the names right? For example, there's not a space in
the table or field name?

What exactly is being asked for in the title of the parameter box?

If you still can't see the anomaly, wwitch the query to SQL View (View menu,
from query design). Copy the SQL statement, and paste here as a followup.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Burquez731 said:
Still having problems...

I tried this as well and I'm still not getting the actual results I want.

FrtInclStmt: IIf([QuotationHeader]![FreightIncl]=True,"Freight
Included","")

Both expressions bring up a parameter value box and if you enter "True" or
"1" then it will pull in the desired text.

What I'm trying to do if create an expression that will look at the table
and field inidcated above (which is a check box) and determine if the box
is
checked it will return the text "Freight Included". If the check box is
not
checked, then it will return no text.

Any ideas????

Thanks a bunch!
-Sharon

Allen Browne said:
Try typing this into the Field row in your query:
IIf([FreightIncl], "Freight Included", Null)


I'm trying to build an expression in Access 97 and need some help. I
believe
that it will be an IIf statement. If a checkbox field within a given
table
is checked, then the text "FREIGHT INCLUDED" will be inserted. If the
checkbox field of this same table is not checked, then no text will be
inserted. The expression I'm building is in a query titled ItemDetail.
The
table is titled QuotationHeader and the checkbox field within this
table
is
named FreightIncl.

Any suggestions?
 
A

Allen Browne

Try without the
=Yes
or replace it with
=True

(Personally I would use Null rather than the zero-length string in the 3rd
argument, but that won't make a difference to the issue.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Burquez731 said:
I double checked the names. The table name is "QuotationHeader" and the
field name is "FreightIncl" and it is a data type format Yes/No.

The parameter box says...
Enter Parameter Value
QuotationHeader!FreightIncl

Here's the SQL statment...
IIf([QuotationHeader]![FreightIncl]=Yes,"Freight Included","") AS
FrtInclStmt

Thanks,
Sharon




Allen Browne said:
Are you sure you have the names right? For example, there's not a space
in
the table or field name?

What exactly is being asked for in the title of the parameter box?

If you still can't see the anomaly, wwitch the query to SQL View (View
menu,
from query design). Copy the SQL statement, and paste here as a followup.

Burquez731 said:
Still having problems...

I tried this as well and I'm still not getting the actual results I
want.

FrtInclStmt: IIf([QuotationHeader]![FreightIncl]=True,"Freight
Included","")

Both expressions bring up a parameter value box and if you enter "True"
or
"1" then it will pull in the desired text.

What I'm trying to do if create an expression that will look at the
table
and field inidcated above (which is a check box) and determine if the
box
is
checked it will return the text "Freight Included". If the check box
is
not
checked, then it will return no text.

Any ideas????

Thanks a bunch!
-Sharon

:

Try typing this into the Field row in your query:
IIf([FreightIncl], "Freight Included", Null)


I'm trying to build an expression in Access 97 and need some help.
I
believe
that it will be an IIf statement. If a checkbox field within a
given
table
is checked, then the text "FREIGHT INCLUDED" will be inserted. If
the
checkbox field of this same table is not checked, then no text will
be
inserted. The expression I'm building is in a query titled
ItemDetail.
The
table is titled QuotationHeader and the checkbox field within this
table
is
named FreightIncl.

Any suggestions?
 

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