473,785 Members | 2,841 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can I bypass my query parameter

This is probably a really silly question but I am exhausted and cant
seem to find the answer. I have a query that I run from a command
button on a form. The query has three criteria set. The first is built
into the form and so is not a problem. Then the second and third
criteria prompt me for parameters. This all works fine and I get the
info I want broken down the way I want to see it. But sometimes I dont
want to filter at all on these two, and would like to see all of the
data. I have tried using all the wildcard options as in the halp files
but they are not working, seem to only relate to part strings. What
can I type into my parameter prompt to allow all records to show. Many
thanks.
Nov 13 '05 #1
4 8230
Try "*", as the criteria value to show all records. Why not create a pop-up
form that will show your choices and use the form's several control values
as the criteria for your query?

Something like:
Like IIf([Forms]![myForm]![pickValue] Is
Null,"*",[forms]![myForm]![pickValue])

-Ed
"Lightning Tony" <ge*******@uk2. net> wrote in message
news:db******** *************** ***@posting.goo gle.com...
This is probably a really silly question but I am exhausted and cant
seem to find the answer. I have a query that I run from a command
button on a form. The query has three criteria set. The first is built
into the form and so is not a problem. Then the second and third
criteria prompt me for parameters. This all works fine and I get the
info I want broken down the way I want to see it. But sometimes I dont
want to filter at all on these two, and would like to see all of the
data. I have tried using all the wildcard options as in the halp files
but they are not working, seem to only relate to part strings. What
can I type into my parameter prompt to allow all records to show. Many
thanks.

Nov 13 '05 #2
ed's got it. you should just be able to just plug in a parameter like:

Like('*')

and have it retrieve all records for that field.

Ed Robichaud wrote:
Try "*", as the criteria value to show all records. Why not create a pop-up form that will show your choices and use the form's several control values as the criteria for your query?

Something like:
Like IIf([Forms]![myForm]![pickValue] Is
Null,"*",[forms]![myForm]![pickValue])

-Ed
"Lightning Tony" <ge*******@uk2. net> wrote in message
news:db******** *************** ***@posting.goo gle.com...
This is probably a really silly question but I am exhausted and cant seem to find the answer. I have a query that I run from a command
button on a form. The query has three criteria set. The first is built into the form and so is not a problem. Then the second and third
criteria prompt me for parameters. This all works fine and I get the info I want broken down the way I want to see it. But sometimes I dont want to filter at all on these two, and would like to see all of the data. I have tried using all the wildcard options as in the halp files but they are not working, seem to only relate to part strings. What
can I type into my parameter prompt to allow all records to show. Many thanks.


Nov 13 '05 #3


Hi gang
Thanks for the prompt reply. I have managed to achieve what I want by
adapting your ideas a little. Maybe I didn't explain that I am a
newcomer to VB so I didn't really understand the answer about popup
forms control values. What I did was type directly into the criteria row
of the underlying query as follows;

Like IIf([text] Is Null,"*",[text])

where text is a different message in each field that I am filtering on.
I don't understand it but it works so I am happy!Just for clarification
could I have found a way that doesn't require some kind of entry into
the query? When you say I should be able to just type "*" do you mean
directly into the parameter prompt box, because I had been trying just
about every combination and just kept getting blank queries (the column
headings display but no records). I have tried typing * on its own, in
quotation marks, in round brackets, in square brackets, with and without
quotation marks in brackets...all to no avail

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
What you've got shouldn't require any input: just hit Enter when the
parameter box appears, and you should get everything back.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Tony Harvey" <to***********@ hotmail.com> wrote in message
news:41******** **@127.0.0.1...


Hi gang
Thanks for the prompt reply. I have managed to achieve what I want by
adapting your ideas a little. Maybe I didn't explain that I am a
newcomer to VB so I didn't really understand the answer about popup
forms control values. What I did was type directly into the criteria row
of the underlying query as follows;

Like IIf([text] Is Null,"*",[text])

where text is a different message in each field that I am filtering on.
I don't understand it but it works so I am happy!Just for clarification
could I have found a way that doesn't require some kind of entry into
the query? When you say I should be able to just type "*" do you mean
directly into the parameter prompt box, because I had been trying just
about every combination and just kept getting blank queries (the column
headings display but no records). I have tried typing * on its own, in
quotation marks, in round brackets, in square brackets, with and without
quotation marks in brackets...all to no avail

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #5

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

Similar topics

2
5844
by: The Plankmeister | last post by:
Hi... I have a query which I'm accessing through PHP as a stored procedure. However, I need to be able not to pass a couple of parameters in certain situations. When I do this, I get an error: Parameter has no default value. But it works fine in Access when I run the query from there and just hit
15
7191
by: deko | last post by:
I need a way to create a table with a programmatically defined name. I have a Make Table query that will create the table with the name that I put in the query, but I don't know how to (or if I can) use a function to pass the table name into the query. Here is the basic form of the Mke Tble query: SELECT TxDate, Amount, Tx_ID, TxAcctName, INTO FROM tblTxJournal;
3
1011
by: cassandra.flowers | last post by:
Hi, I was wondering if it is possible (Using access) to have a query parameter as a drop down box rather than a text box? e.g. typing as criteria for a query produces a box with a text box for you to enter the parameter. Can any body enlighten me on how to turn this text box into a drop down box? And whether it is possible?
6
7138
by: Andy | last post by:
Hello, I am having many problems with setting up a parameter query that searches by the criteria entered or returns all records if nothing is entered. I have designed an unbound form with 3 fields on it: Date (DateSpan1 and DateSpan2), Originator, and GroupName. I have added a button that triggers a query and uses those fields as its parameter criteria to populate a form. The user must be allowed to either enter all of the
3
4105
by: Uwe | last post by:
Howdy! I've googled and googled for this without success, and either it's so easy that nobody has ever asked, or there is some serious reason nobody would do this. But I'm going to ask anyway. I'd like to move my ASP.NET session ID from the default cookie into the URL. I tried the "cookieless" approach and it doesn't work for me for two reasons:
0
1504
by: HomerS007 | last post by:
Hi, I'm using asp.net 2.0 and sql server 2000 for my first ever project. On one of the page in the application, I want to limit what the user can see based on his/her login. It's a page that has sensitive personal info like social security number and I only want user to see their own information and no one else. Can anybody please tell me how to pass in the username as a query parameter? I used a DetailsView control to and configure...
20
5245
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...
4
2375
by: hobbit2612 via AccessMonster.com | last post by:
Hi, I wonder if someone might be able to help me please. I'm fairly new to MS Access, and everything I know is self taught so please bear with me. I have put together a query which consists of a few fields. Some of these have parameters which I've added to them. This in turn feeds a report.
1
4889
by: codexxx | last post by:
Hi All, I have got a requirement from a client who wants the query parameter to be hidden in the browser. What he wants is like following. If a url link becomes like http://mysite.com/profile.php?id=34 then it should be replaced by something like http://mysite.com/profile.php/34 or some thing like this. So please help me by giving some suggestions.
0
9645
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
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9952
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
6740
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
5381
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
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
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
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.