473,507 Members | 6,459 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 2579
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
16928
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...
2
2655
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...
1
3792
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...
2
30293
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...
3
10327
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...
21
5715
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...
2
2946
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...
6
4428
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...
1
5153
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...
20
5185
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...
0
7314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
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...
1
7030
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...
0
7482
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
5623
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,...
0
4702
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
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.