473,508 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.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
1 10303
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4251
by: MX1 | last post by:
Simpler way to ask question from my previous post. I wrote a query and it has a paramter field in it. I want to enter a date with the current year. If it I put in 6/30/2003, it works great. If I...
3
579
by: John young | last post by:
I have been looking for an answer to a problem and have found this group and hope you can assist . I have been re doing a data base I have made for a car club I am with and have been trying to...
0
3484
by: starace | last post by:
I have designed a form that has 5 different list boxes where the selections within each are used as criteria in building a dynamic query. Some boxes are set for multiple selections but these list...
3
3283
by: MLH | last post by:
Am repeating question with different subject heading, perhaps stating more clearly my problem... I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the...
4
1764
by: icony | last post by:
Hi everyone, I have this slq code slqtext = "SELECT . From total_installs, uachoisi WHERE (((.)='*afe*'));" which makes a query that only accept values containing "afe". It works perfectly.
3
3501
by: rhobson2 | last post by:
Hello, I wrote a database applicaiton using Access XP (2002) and everything has been working good for the client until they purchased a couple of new computers with Access 2003. The meetings...
4
2941
by: allanx38 | last post by:
I have a query that uses a value from a form as a criteria. For example looking for all customers belonging to a particular party. the criteria on the QBE looks like !! I am trying to open the...
5
5449
by: RacerX2000 | last post by:
I have an MS access Database (2000) and Have created a form that sets a variable to a value I would like (Based on other selections in the form) to pass to my query criteria and I get the following...
3
2459
by: deejayquai | last post by:
Hello Simple one this I guess, but I'm quite stuck at the moment. I would like to update the records displayed in my listbox (lstStudents) using criteria selected from my combo (cboForm) in a...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7125
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3186
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.