Help with syntax for where clause

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vulcaned@isp.com

    #1

    Help with syntax for where clause

    Hi All,
    Need help with the right statement for the following situation.
    In Access97 I have a Form(frmComplai ntUpdate) which has a Tab
    Control(called TabCtl987) with several tabs(first tab we'll call
    tbComplInfo). tbComplInfo has a subform(sbfrmCo mplaintInfo), on it,
    that subform has two dropdowns(names-cboStatus, cboStatDesc).
    The values displayed in the second dropdown are dependant on the value
    chosen in the first dropdown. So, in the rowsource of the second
    dropdown(lookin g at it in query grid mode)is

    SELECT DISTINCTROW tblComplaintSta tusTypes.Status Description FROM
    tblComplaintSta tusTypes WHERE
    (((tblComplaint StatusTypes.Com plaintStatus)=[Forms]![frmComplaintUpd ate]![sbfrmComplaintI nfo].[Form]![cboStatus]));

    What's Not working is the right side of the where clause -
    [Forms]![frmComplaintUpd ate]![sbfrmComplaintI nfo].[Form]![cboStatus]

    I know it's the syntax of it and that's what I'm stuck on, how do
    I express

    Display Status Descriptions Where ComplaintStatus equals the value
    selected in cboStatus which sits on a subform which sits on a tab which
    is in a tabcontrol which sits on a form

    Thanks in advance for any assistance with this
    bobh.

  • Alan Webb

    #2
    Re: Help with syntax for where clause

    Bobh,
    My head hurts. I like things simple because I am an English major and all
    this long, intricate reference to a deeply embedded object stuff starts to
    make me feel small in the shadow of all these brighter math students I share
    this group with . . . Ok, enough with the verbal fart. I tend to unbind the
    combo box in a case like this and have it change the value of a module level
    or application level variable or property. That way the source object can
    refer to a simple variable name when it is setting the value and the
    destination object can similarly refer to a simple variable name. With
    Properties I gain the ability to make some choices about what value to
    return when either no value is given by the source object or an
    unnacceptable value is supplied by the source object. I hope this helps.
    --
    Alan Webb
    knoNOgeek@SPAMh otmail.com
    "It's not IT, it's IS"

    <vulcaned@isp.c om> wrote in message
    news:1114202777 .287184.119400@ f14g2000cwb.goo glegroups.com.. .[color=blue]
    > Hi All,
    > Need help with the right statement for the following situation.
    > In Access97 I have a Form(frmComplai ntUpdate) which has a Tab
    > Control(called TabCtl987) with several tabs(first tab we'll call
    > tbComplInfo). tbComplInfo has a subform(sbfrmCo mplaintInfo), on it,
    > that subform has two dropdowns(names-cboStatus, cboStatDesc).
    > The values displayed in the second dropdown are dependant on the value
    > chosen in the first dropdown. So, in the rowsource of the second
    > dropdown(lookin g at it in query grid mode)is
    >
    > SELECT DISTINCTROW tblComplaintSta tusTypes.Status Description FROM
    > tblComplaintSta tusTypes WHERE
    > (((tblComplaint StatusTypes.Com plaintStatus)=[Forms]![frmComplaintUpd ate]![sbfrmComplaintI nfo].[Form]![cboStatus]));
    >
    > What's Not working is the right side of the where clause -
    > [Forms]![frmComplaintUpd ate]![sbfrmComplaintI nfo].[Form]![cboStatus]
    >
    > I know it's the syntax of it and that's what I'm stuck on, how do
    > I express
    >
    > Display Status Descriptions Where ComplaintStatus equals the value
    > selected in cboStatus which sits on a subform which sits on a tab which
    > is in a tabcontrol which sits on a form
    >
    > Thanks in advance for any assistance with this
    > bobh.
    >[/color]


    Comment

    Working...