473,386 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Running a parameter query with input from a form's combo box.

4 Nibble
I am trying to run a parameter query that returns results based upon the input in a form's combo box on a form. I would like it so that the user selects an option from the combo box, presses a button and results are returned based upon that.

now as I understand it in the criteria field in the correct column should read:

[Forms]![FormName]![ComboName]

but this doesn't work.

I've tested it with a textbox instead using:

[Forms]![FormName]![TextboxName]

and that works but with a combo box it doesn't.
Jan 22 '14 #1

✓ answered by zmbd

When you say it doesn't work, what do you mean?

Do you have the bound column of the combobox set correctly?

The bound column is the value that will be returned from the rowsource property. If it is blank, then your combobox is returning nothing. You need to have it set to the column of data that is required in your query.

Keep in mind, CONTROL SOURCE is NOT the same as ROW SOURCE in a combo/list box. Normally the two are only related in that the bound column of the ROW SOURCE must return a value that is of the correct typecast as the field to which the cbo's CONTROL SOURCE is set (bound).

There is another method with multi-column record sources that you could use read thru this: How to select Records in an Access Subform from a Combo Box it's a bit of an overkill so don't worry if you don't follow somehthing, just ask back here and we'll clear it up (^_^)

3 13781
zmbd
5,501 Expert Mod 4TB
When you say it doesn't work, what do you mean?

Do you have the bound column of the combobox set correctly?

The bound column is the value that will be returned from the rowsource property. If it is blank, then your combobox is returning nothing. You need to have it set to the column of data that is required in your query.

Keep in mind, CONTROL SOURCE is NOT the same as ROW SOURCE in a combo/list box. Normally the two are only related in that the bound column of the ROW SOURCE must return a value that is of the correct typecast as the field to which the cbo's CONTROL SOURCE is set (bound).

There is another method with multi-column record sources that you could use read thru this: How to select Records in an Access Subform from a Combo Box it's a bit of an overkill so don't worry if you don't follow somehthing, just ask back here and we'll clear it up (^_^)
Jan 22 '14 #2
James0192
4 Nibble
Thanks for that. The bound column was set wrong hence it wasn't returning the right thing.
Jan 23 '14 #3
zmbd
5,501 Expert Mod 4TB
I love the simple fixes... (^_^)

BOL
-z
Jan 23 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
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
by: MX1 | last post by:
I'm ready to pull the hair out of my head. I have a query with a couple of parameters that I want to get from combo boxes on a form. One parameter is a date with a dynamically calculated year and...
1
by: carrionk | last post by:
Hi, I have created a Subform which SourceObject is a parameter query. This is the Query: Qry Name:80IsscomProduct SELECT * FROM Isscomp28 WHERE Like ;
2
by: francophone77 | last post by:
Does anyone know how to setup a parameter query, which allows the user to choose from a combo box? TIA
1
by: john_stivenson | last post by:
I have a subform whose source is a parameter query. How can I programatically change query parameters and refresh subform without showing "Enter Parameter Value" dialog?
7
by: ndeeley | last post by:
Hi there, I`m running a query from the values in a combo box: !! ..against a field that has two values - in this case Workshops. So the user can select reports to run on Exewater or Tolgus...
3
by: ericargent | last post by:
Hi I'm using Acces 2003 I have Query where the several parameters for the criteria are supplied from a form. One parameter source is a combo box. What I am trying to do is if: An item is...
11
by: mezmerize | last post by:
Firstly a description of the situation to give you an insight. have a table of motorcycles (Registration no.,makes,models,colour,no.owners, etc. and i would like to be able to run a query that...
7
by: kent christensen | last post by:
Okay so i have been trying to do something within Access and cannot seem to get it to work. Heres what i have: i have 3 tables set up that are identical. The only difference is that the tables...
3
elak6
by: elak6 | last post by:
I am trying to run the query below, but i keep on getting syntax error in query expression. I dont know exactly what i have done wrong and any help to put me on the right path will be very much...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.