473,659 Members | 2,671 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

combo box in query

How can i include a combo box in the criteria field in a parameter query

Nov 12 '05 #1
5 13826
The syntax to refer to the control on a form is:

Forms!frmFormNa me!ctlContolNam e

on a subform:
Forms!frmParent FormName!ctlSub formControlName .Form!ctlContro lName

The ctlSubformContr olName is the name of the control on the main form that holds the
subform, not the name of the subform itself.

--
Wayne Morgan
Microsoft Access MVP
"LouD" <du******@yahoo .com> wrote in message
news:3Z******** *************@n ews-server.bigpond. net.au...
How can i include a combo box in the criteria field in a parameter query

Nov 12 '05 #2
where do I put this syntax, at the mom what i have in the criteria field
is [enter name here]

Wayne Morgan wrote:
The syntax to refer to the control on a form is:

Forms!frmFormNa me!ctlContolNam e

on a subform:
Forms!frmParent FormName!ctlSub formControlName .Form!ctlContro lName

The ctlSubformContr olName is the name of the control on the main form that holds the
subform, not the name of the subform itself.


Nov 12 '05 #3
Place it in the criteria field instead of what you have. Access will probably put brackets
around each part when you are done. The form must be open (visible or hidden is ok) for
this to work.

Remember the value of a combo box is the value of the Bound Column for the row that is
selected. If the value you are looking for is in a different column, you will need to
specify the column.

--
Wayne Morgan
Microsoft Access MVP
"LouD" <du******@yahoo .com> wrote in message
news:sg******** ***********@new s-server.bigpond. net.au...
where do I put this syntax, at the mom what i have in the criteria field
is [enter name here]

Wayne Morgan wrote:
The syntax to refer to the control on a form is:

Forms!frmFormNa me!ctlContolNam e

on a subform:
Forms!frmParent FormName!ctlSub formControlName .Form!ctlContro lName

The ctlSubformContr olName is the name of the control on the main form that holds the
subform, not the name of the subform itself.

Nov 12 '05 #4
Wayne

I tried suggesting what you said but it stll comes up as a msg text box
not a msg combo box heres is the sql the was genrated when i used to
wizard to set up the query
SELECT tblDetail.Det_I D, tblCategory.Cat _Code, tblName.Plant_N ame,
tblName.Generic _Name, tblContainer.Co nt_Size, tblDetail.Cost,
tblDetail.Price , tblDetail.Quant ity, tblLocation.Loc _Code
FROM tblName INNER JOIN (tblLocation INNER JOIN (tblContainer INNER JOIN
(tblCategory INNER JOIN tblDetail ON tblCategory.Cat _ID =
tblDetail.Cat_I D) ON tblContainer.Co nt_ID = tblDetail.Cont_ ID) ON
tblLocation.Loc _ID = tblDetail.Loc_I D) ON tblName.Plant_I D =
tblDetail.Plant _ID
GROUP BY tblDetail.Det_I D, tblCategory.Cat _Code, tblName.Plant_N ame,
tblName.Generic _Name, tblContainer.Co nt_Size, tblDetail.Cost,
tblDetail.Price , tblDetail.Quant ity, tblLocation.Loc _Code
HAVING (((tblName.Plan t_Name) Like "*" & [Enter the plant name or frist
characters of the name:] & "*"));

Yr assitance appreciated

Wayne Morgan wrote:
Place it in the criteria field instead of what you have. Access will probably put brackets
around each part when you are done. The form must be open (visible or hidden is ok) for
this to work.

Remember the value of a combo box is the value of the Bound Column for the row that is
selected. If the value you are looking for is in a different column, you will need to
specify the column.


Nov 12 '05 #5
You're right, doing it this way won't bring up a combo box. To bring up a combo box you
will need to create your own form with a combo box on it then have the query's criteria
refer to that combo box.

What are you using this query for? If it is for another form or a report, you could pop-up
the form with the combo box in the OnOpen event of this other form or report using the
acDialog window mode argument. This will pause the code until you hide or close (you'll
have to hide it for the query to see it because it has to be open) the pop-up form and
will allow the value in the combo box to be set before the query is looking for it.
HAVING (((tblName.Plan t_Name) Like "*" & [Forms]![frmFormName]![ctlContolName] & "*"));
--
Wayne Morgan
Microsoft Access MVP
"LouD" <du******@yahoo .com> wrote in message
news:83******** *************@n ews-server.bigpond. net.au... Wayne

I tried suggesting what you said but it stll comes up as a msg text box
not a msg combo box heres is the sql the was genrated when i used to
wizard to set up the query
SELECT tblDetail.Det_I D, tblCategory.Cat _Code, tblName.Plant_N ame,
tblName.Generic _Name, tblContainer.Co nt_Size, tblDetail.Cost,
tblDetail.Price , tblDetail.Quant ity, tblLocation.Loc _Code
FROM tblName INNER JOIN (tblLocation INNER JOIN (tblContainer INNER JOIN
(tblCategory INNER JOIN tblDetail ON tblCategory.Cat _ID =
tblDetail.Cat_I D) ON tblContainer.Co nt_ID = tblDetail.Cont_ ID) ON
tblLocation.Loc _ID = tblDetail.Loc_I D) ON tblName.Plant_I D =
tblDetail.Plant _ID
GROUP BY tblDetail.Det_I D, tblCategory.Cat _Code, tblName.Plant_N ame,
tblName.Generic _Name, tblContainer.Co nt_Size, tblDetail.Cost,
tblDetail.Price , tblDetail.Quant ity, tblLocation.Loc _Code
HAVING (((tblName.Plan t_Name) Like "*" & [Enter the plant name or frist
characters of the name:] & "*"));

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2380
by: Dalan | last post by:
I have been searching the archives in an effort to discover how to derive a dual use of a single combo box - so far no go. I found the piece below which pretty much represents the usage. To summarize: The cboKeyword box on the frmCustomer looks up Keywords from a separate table that have just a list of keywords and a KeyID number. The bound column is tied to the autonumber and is saved in the frmCustomer table. The keywords appear in the...
0
2379
by: Andrew | last post by:
Hello, I am trying to create a chart whose underlying query is linked to 2 combo boxes on the same form. I want to pass the values from the combo boxes into the chart query to allow the chart data to be manipulated easily. The combo box uses "Row Source Type" = Table/Query. The "Row Source" references a query to extract a distinct list of data.
4
7172
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
3
3649
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1" through "Phase 10" (there are 10 Phases I want to sort from) Once the phase has been selected a second combo box would populate.
2
1870
by: MLH | last post by:
I invoked the combo-box wizard today, telling it to use a 4-table union query as a row-source for the combo-box it was assisting me in building. The error I got was without number and stated, "Data cannot be retrieved from the source you have selected. You must select a different table or query to continue in the wizard." just after I chose the query named qryAuthsOwnersAddnlOwnersLienholders4OneCar. Have any of you ever seen that error...
2
3058
by: visionstate | last post by:
Hi there, I am working on a form that uses 3 text boxes and 3 combo boxes. When any data is entered into any of these, I click a command button and this requeries a sub query in the form and displays data dependent on what has been typed in. After having trouble with populating my second combo box (I eventually populated it by putting the fields for both combo boxes in 1 separate query) I am now having problems with the 3rd one and am...
6
12466
by: fieldja | last post by:
I have a form called OwnerForm. It contains a combo box called Owner. The combo box looks up names from a table called OwnerName. It contains fields called OwnerID and Owner. I also have a main form called ProjectsForm. This form has several fields to enter data. I have a query that is called Owner Query. This query contains the fields IDNumber.Projects2 Team.Projects2 and Owner.OwnerName getting information from tables. On the...
1
3094
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form Main form: no record source. Has an unbound combo box. name: frminput combo name: cboAccounts The row...
3
3301
by: emily.a.day | last post by:
I have a book database, and I have set up a query to search by subject. As it is now, the searcher has to know the subject and type it into the query. I wonder if there is a way to have a combo box where the searcher can select the subject before running the query, rather than consulting the separate subject list and typing the subject in manually. I have tried sticking the combo box in the report, but can't figure that out. I think...
0
2909
by: Del | last post by:
Hello and thanks for any and all assistance! I have a database that is used by several users on several different machines. The backend database is housed on a file server. Each user has a front end on their local machine. The main form of the database has several query driven combo boxes. These queries pull data from the back end database to populate the combo boxes.
0
8427
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8626
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.