QUERY QUESTION: how to use form variable as criteria ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Chartier

    QUERY QUESTION: how to use form variable as criteria ??

    Hello.

    I have a question concerning variable criteria for queries and reading
    forms.

    Let's say that I have a table with 2 fields and 10 records. One of the
    fields can have two different values: A or B. Then let's say that I've
    designed a slpit form. The right side of the form allows for data entry
    while the left side allows for record filtering.

    On the left side, the user can activate a control box or radio box to choose
    between A and B records. As soon as he does that, the records are
    automatically filtered.

    I only know how to create critera with constants (criteria = "A")

    QUESTION
    -------------
    The problems is this: How can I edit my query for it to look something like
    this:
    For field CHOICE, critera = comboChoice.Val ue from frmLeft

    I tried entereing this, and it gave me "=[frmLeft].[comboChoice].value" or
    something very close to this.

    Thanks for your help!


  • Ray

    #2
    Re: QUERY QUESTION: how to use form variable as criteria ??

    You need to change the query criteria, as you have suggested, while doing
    the following:

    1 - The criteria must use a full reference to the field, that is,
    Forms!FormName! RadioButton

    2 - After you click the Radiobutton or select the dropdown option on the
    left side of the form, you must requery the listbox (or however you are
    displaying your data) on the right hand side of the form.


    Ray


    --
    Access Solutions for College and University Student Administration
    ETIK - Electronic Tender Issue Kit - Create and Issue tenders electronically
    and receive the responses electronically when clients use the free Response
    Kit.
    Grab! - Uses your PowerPoint files to create presentations on-the-fly for
    demonstrations, displays, queue distractors, Point-of-Sale information

    Daniel Chartier <daniel_cat at hotmail dot com> wrote in message
    news:3f7f8df5_3 @aeinews....[color=blue]
    > Hello.
    >
    > I have a question concerning variable criteria for queries and reading
    > forms.
    >
    > Let's say that I have a table with 2 fields and 10 records. One of the
    > fields can have two different values: A or B. Then let's say that I've
    > designed a slpit form. The right side of the form allows for data entry
    > while the left side allows for record filtering.
    >
    > On the left side, the user can activate a control box or radio box to[/color]
    choose[color=blue]
    > between A and B records. As soon as he does that, the records are
    > automatically filtered.
    >
    > I only know how to create critera with constants (criteria = "A")
    >
    > QUESTION
    > -------------
    > The problems is this: How can I edit my query for it to look something[/color]
    like[color=blue]
    > this:
    > For field CHOICE, critera = comboChoice.Val ue from frmLeft
    >
    > I tried entereing this, and it gave me "=[frmLeft].[comboChoice].value" or
    > something very close to this.
    >
    > Thanks for your help!
    >
    >[/color]


    Comment

    Working...