473,662 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Parameter Query - Select All

139 New Member
Hi there,

I`m running a query from the values in a combo box:
[forms]![frmMyForm]![cboMyValues]

..against a field that has two values - in this case Workshops. So the user can select reports to run on Exewater or Tolgus workshops.

However, my client has requested the combo box has a third selection - Both Workshops, so the query selects all records from the fields.

How do I put this into my Combo box, so that a value of `Both` inserts a value into my query that selects all the records?

Thanks
Apr 3 '07 #1
7 2600
Rabbit
12,516 Recognized Expert Moderator MVP
Make a second hidden column and bind the combo box to that column where the value of Both is *.

In the criteria, use Like Forms![Form Name]![Combobox Name]
Apr 3 '07 #2
ndeeley
139 New Member
Rabbit,

Thanks - but make a second hidden column where? In my primary table (the one with the field name of `Workshops`, or in another table where the users can select the values in the combobox?

Sorry for being so thick!
Apr 4 '07 #3
ndeeley
139 New Member
Rabbit,

No need to reply - I`ve got it to work.

You are a genius. Thanks for your help.

Neil
Apr 4 '07 #4
Rabbit
12,516 Recognized Expert Moderator MVP
Not a problem, good luck.
Apr 4 '07 #5
dceglar
2 New Member
Make a second hidden column and bind the combo box to that column where the value of Both is *.

In the criteria, use Like Forms![Form Name]![Combobox Name]
I am trying to do the exact same thing - but I am having the user use a drop-down list on a form based on a lookup table. Once the user makes a selection and clicks on OK, the form goes invisible. Then on a report the "Upon Open" is fetching the combo box results [combo2] from the form. But, basically I believe it is the same situation. Right now, the report only runs based on the one selection (of several possible ones) and I would like the option for the user to pull the report based on all the selections listed in the lookup table. Where exactly do you create the second hidden column? And where do you put the criteria? I have tried different things to no avail. Thanks!
Apr 11 '07 #6
dceglar
2 New Member
Hi there,

I`m running a query from the values in a combo box:
[forms]![frmMyForm]![cboMyValues]

..against a field that has two values - in this case Workshops. So the user can select reports to run on Exewater or Tolgus workshops.

However, my client has requested the combo box has a third selection - Both Workshops, so the query selects all records from the fields.

How do I put this into my Combo box, so that a value of `Both` inserts a value into my query that selects all the records?

Thanks


I am trying to do the exact same thing - but I am having the user use a drop-down list on a form based on a lookup table. Once the user makes a selection and clicks on OK, the form goes invisible. Then on a report the "Upon Open" is fetching the combo box results [combo2] from the form. But, basically I believe it is the same situation. Right now, the report only runs based on the one selection (of several possible ones) and I would like the option for the user to pull the report based on all the selections listed in the lookup table. Where exactly do you create the second hidden column? And where do you put the criteria? I have tried different things to no avail. Thanks
Apr 11 '07 #7
Rabbit
12,516 Recognized Expert Moderator MVP
I am trying to do the exact same thing - but I am having the user use a drop-down list on a form based on a lookup table. Once the user makes a selection and clicks on OK, the form goes invisible. Then on a report the "Upon Open" is fetching the combo box results [combo2] from the form. But, basically I believe it is the same situation. Right now, the report only runs based on the one selection (of several possible ones) and I would like the option for the user to pull the report based on all the selections listed in the lookup table. Where exactly do you create the second hidden column? And where do you put the criteria? I have tried different things to no avail. Thanks
You put the other column in the table that's supplying the recordsource for the combobox. You include that column in the combobox but hide it. The second column stores the name of the form to open.
Apr 11 '07 #8

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

Similar topics

3
16940
by: WGW | last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost! everything I need. Maybe not efficiently, but usefully. However, I have a problem -- a complex query problem... I can create a parameter query in a stored procedure, but how do I use the result set of a parameter query in a select query (in the same or another sp)? In short, if a select query contains a result table that is generated as a parameter query, how do I...
2
2674
by: Betrock | last post by:
This is probably very simple, but I just can't see my way thru it..... Short version: keyed values(numeric)in a lookup table are stored in a main table. They are displayed as text values - the keyed values description. I need a parameter query to return a range of these values. The parameter input won't accept the 'text' version. You can do it with 'Find' because you can select 'as formatted'. But I need a range. Please, any...
1
3800
by: Cory | last post by:
When I run the subroutine testEmailContacts the msgbox says that there is only 1 record. The sql for qyEmailContactsQyCard is below. There is over 3000 records in the table "tbl:Contact". What am i doing wrong? Thanks in advance. PARAMETERS cardYesNo Bit, ParSearchCard Bit; SELECT .ContactID FROM WHERE (((.Card)=)) OR ((()=No));
2
30315
by: rg | last post by:
Hi all, I have query about passing a parameter from form to a query. My situation is as follows: I have a query that pulls up some data from a table, however there is a condition that must be filled in by the user. Hence when you run the query there is a "Enter Parameter Value" prompt that must be completed. A further complication is that the parameter is actually within the WHERE statement, i.e.:
3
10335
by: Erwin Bormans | last post by:
Hello I want to make a parameter query where i can select the parameter out of a drop down box instead of typing the parameter in a text box. For example: if i have customers and want to run a query that gives me all the custormers from a chosen state, that i can choose the state in a drop down list instead of knowing it by heart and typing it myself. Does anybody has an idea or example for such a query?
21
5752
by: Marc DVer | last post by:
I am trying to create a query that can be loaded as a querydef object but not having to assign values to the parameters if I don't want to. Normally when using a parameter query in VBA my code would go something like this: dim qry as dao.querydef set qry = currentdb.querydefs("myquery") qry.parameters("Par1") = "blah"
2
2957
by: Zeya | last post by:
I have an application where I am required to run a full text query. My database is MySQL and code in C#. The way all queries are SELECT * FROM table WHERE firstname = ? and using command parameter the value of ? is added. But, how would I do the same in case of full text search. SELECT *, ROUND( MATCH(title, comments) AGAINST (? IN BOOLEAN MODE ) * 10, 2 ) AS score FROM table WHERE MATCH(title,comments) AGAINST (? IN
6
4460
by: tizmagik | last post by:
I am having a lot of difficulty generating a CrossTab Query based report. I have looked online for several tutorials and whatnot but I have not been able to really find what I'm looking for, nor have I been able to adapt other people's solutions/tips to fit what I need. If anyone could please help me with the following it would be really appreciated, thank you! I need to generate a Report (say: repCrossTab) that grabs it's data from the...
1
5171
by: rosie2006 | last post by:
Environment: .net2.0 over oracle Problem? a simple select statement within a DetailsView that gets two parameter values from a GridView SelectedValue. It might be valuable to understand that to pull a single record from this particular table requires two parameters. What follows defies understanding. The desired query: <asp:SqlDataSource .....
20
5217
by: exipnakias | last post by:
Hello Guys. In a form I created a listbox which looks up the values of a table. I want: 1) ..to create a query where a parameter will be needed in order to be loaded. But I do not want to write the parameter, I want to select a row from the listbox and after clicking in a button, the query to automatically take the current value of listbox as the needed parameter and then to load the query. (The Inputbox for "Enter Parameter" will...
0
8432
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
8764
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...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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
7367
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
6186
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
5654
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
4180
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...
1
2762
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 we have to send another system

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.