Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Check Box and Expression Building

Discussion in 'Information Technology' started by Burquez731, Nov 9, 2005.

  1. Burquez731

    Burquez731
    Expand Collapse
    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?
     
  2. Loading...


  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

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

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    news:27BF49A2-28C7-472D-A1F8-B3B3DA415B20@microsoft.com...
    > 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?
     
  4. Burquez731

    Burquez731
    Expand Collapse
    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" wrote:

    > Try typing this into the Field row in your query:
    > IIf([FreightIncl], "Freight Included", Null)
    >
    > --
    > Allen Browne - Microsoft MVP. Perth, Western Australia.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    > news:27BF49A2-28C7-472D-A1F8-B3B3DA415B20@microsoft.com...
    > > 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?

    >
    >
    >
     
  5. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    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.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    news:2E4DF616-8D1C-4A15-B02C-C227146C2CA3@microsoft.com...
    > 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" wrote:
    >
    >> Try typing this into the Field row in your query:
    >> IIf([FreightIncl], "Freight Included", Null)
    >>
    >>
    >> "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    >> news:27BF49A2-28C7-472D-A1F8-B3B3DA415B20@microsoft.com...
    >> > 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?
     
  6. Burquez731

    Burquez731
    Expand Collapse
    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" wrote:

    > 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.
    > Tips for Access users - http://allenbrowne.com/tips.html
    > Reply to group, rather than allenbrowne at mvps dot org.
    >
    > "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    > news:2E4DF616-8D1C-4A15-B02C-C227146C2CA3@microsoft.com...
    > > 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" wrote:
    > >
    > >> Try typing this into the Field row in your query:
    > >> IIf([FreightIncl], "Freight Included", Null)
    > >>
    > >>
    > >> "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    > >> news:27BF49A2-28C7-472D-A1F8-B3B3DA415B20@microsoft.com...
    > >> > 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?

    >
    >
    >
     
  7. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    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.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    news:F06E8CFC-01CB-48B0-B110-3364DE33064A@microsoft.com...
    >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" wrote:
    >
    >> 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" <Burquez731@discussions.microsoft.com> wrote in message
    >> news:2E4DF616-8D1C-4A15-B02C-C227146C2CA3@microsoft.com...
    >> > 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" wrote:
    >> >
    >> >> Try typing this into the Field row in your query:
    >> >> IIf([FreightIncl], "Freight Included", Null)
    >> >>
    >> >>
    >> >> "Burquez731" <Burquez731@discussions.microsoft.com> wrote in message
    >> >> news:27BF49A2-28C7-472D-A1F8-B3B3DA415B20@microsoft.com...
    >> >> > 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?
     

Share This Page