473,804 Members | 3,018 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A little help on an operator

I am passing a value from a combo box on a report initiation form to a
query which is the record source for the report.

My question is how do I pass the combo box value with an operator. I
want to pass this: <>59.

The query will run if I use 59, but will not run with <>59. Ideally, I
want to use the Like statement before the form's control reference in
the query criteria field so I can also run a "*" for all records. I
have tried everything I can think of but no success with the operator
and number criteria.

Thanks in advance.

Troy Lee
Jun 27 '08 #1
2 1198
On Tue, 10 Jun 2008 11:24:53 -0700 (PDT), tr******@comcas t.net wrote:
I am passing a value from a combo box on a report initiation form to a
query which is the record source for the report.

My question is how do I pass the combo box value with an operator. I
want to pass this: <>59.

The query will run if I use 59, but will not run with <>59. Ideally, I
want to use the Like statement before the form's control reference in
the query criteria field so I can also run a "*" for all records. I
have tried everything I can think of but no success with the operator
and number criteria.

Thanks in advance.

Troy Lee
You cannot pass the <operator, but you can include it in the query
criteria.

WHERE YourTable.Field Name <>[Forms!FormName! ControlName] OR
[Forms!FormName! ControlName] Is Null

If you do not enter anything in the form control all records will be
returned.
If you enter a number value in the control, just those records will
NOT be returned.

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Jun 27 '08 #2
tr******@comcas t.net wrote:
I am passing a value from a combo box on a report initiation form to a
query which is the record source for the report.

My question is how do I pass the combo box value with an operator. I
want to pass this: <>59.

The query will run if I use 59, but will not run with <>59. Ideally, I
want to use the Like statement before the form's control reference in
the query criteria field so I can also run a "*" for all records. I
have tried everything I can think of but no success with the operator
and number criteria.

Thanks in advance.

Troy Lee
You might create a report with a recordsource like
Select * From Table1

There's no filter, just all the records.

Now when you open the report, you might set the filter
Me.Filter = "Status <59"
Me.FilterOn = True

If you are using a current version of Access, you can pass the argument
to the report. Docmd.OpenRepor t "x",,,,,"<5 9"
If Not IsNull(Me.OpenA rgs) then
Me.Filter = "status " & Me.OpenArg
Me.FilterON = true
Endif

Denial
http://www.youtube.com/watch?v=Q4vJ8ZdmIvA
Jun 27 '08 #3

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

Similar topics

5
3011
by: Tongu? Yumruk | last post by:
I have a little proposal about type checking in python. I'll be glad if you read and comment on it. Sorry for my bad english (I'm not a native English speaker) A Little Stricter Typing in Python - A Proposal As we all know, one of the best things about python and other scripting languages is dynamic typing (yes I know it has advantages and disadvantages but I will not discuss them now). Dynamic typing allows us to change types of...
2
4879
by: Slash | last post by:
I often do a lot of text-mode programming in Linux and wanted to use colors in text mode, and found the ncurses library needlessly complex for small applications. So I wrote my own little header to handle colors in C++. (The code follows.) This allows me to write code like cout << gotoxy(10, 11) << color(lightcyan, blue) << "some text whatever";
8
1955
by: Usman | last post by:
Huy everyone , Well I am not a big C++ programmer , I am just a little young kid on it tryint to learn . Actually I was given an assignment last week by my teacher which I solved completely but was unable to go through one question.
2
1953
by: MyNameIsnt | last post by:
Can anyone tell me why, when I click on the buttons it register 2 characters on the display? if you use the right mousebutton it works ok, but the buttons dont flash?? it works fine without the aqua buttons, (using just windows forms buttons... Main Form cs file //----------------------------------------------------------------------------------------------------------------------
3
977
by: Jacobo Rodriguez Villar | last post by:
Hello, I'm trying to use the find algo from the stl library, over a list of pointers: std::list<Program *> m_programs in this method: Program *GLSLManager::GetProgram(GLhandleARB id) {
2
2265
by: brzozo2 | last post by:
Hello, this program might look abit long, but it's pretty simple and easy to follow. What it does is read from a file, outputs the contents to screen, and then writes them to a different file. It uses map<and heavy overloading. The problem is, the output file differs from input, and for the love of me I can't figure out why ;p #include <iostream> #include <fstream> #include <sstream>
16
1780
by: mdh | last post by:
Can someone look at this little program and tell me why the last line is not compiling. #include <stdio.h> int main (){ int i, j, k; i=0;
2
4755
by: jjcp | last post by:
I would like to say thanks in advance for insight anyone can shed on this for me. Long story short from time to time I need to us C++ to take a list of file and make an index out of them in html. for this I use fstream both for input and output. So, i have a simple file that I just change few things on and I get the output formatted to what I want. So I installed FC6 on my home system and get out my handy usb drive because i needed...
8
4093
by: Andrew Savige | last post by:
I'm learning Python by reading David Beazley's "Python Essential Reference" book and writing a few toy programs. To get a feel for hashes and sorting, I set myself this little problem today (not homework, BTW): Given a string containing a space-separated list of names: names = "freddy fred bill jock kevin andrew kevin kevin jock" produce a frequency table of names, sorted descending by frequency. then ascending byname. For...
0
9591
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
10594
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10331
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
10087
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
9166
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
7631
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
5529
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
4306
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
3
3001
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.