By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,790 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,790 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.Value from frmLeft

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

Thanks for your help!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ray
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
www.bluebridge.com.au
Daniel Chartier <daniel_cat at hotmail dot com> wrote in message
news:3f7f8df5_3@aeinews....
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.Value from frmLeft

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

Thanks for your help!

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.