473,466 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with inputing criteria for query?

2 New Member
I'm making a query so user can look for orders which are completed or not
Expand|Select|Wrap|Line Numbers
  1. SELECT Orders.Order_ID, Orders.Order_date, Orders.Order_complete
  2. FROM Orders
  3. WHERE (((Orders.Order_complete)=[Please enter]));
My problem is I cannot type in "Yes" or "No" when I was asked to input the value. Is there any way possible to fix this because the query works fine if I change it to this.
Expand|Select|Wrap|Line Numbers
  1. SELECT Orders.Order_ID, Orders.Order_date, Orders.Order_complete
  2. FROM Orders
  3. WHERE (((Orders.Order_complete)=Yes));
Thanks
Oct 30 '08 #1
4 1084
DonRayner
489 Recognized Expert Contributor
I'm assuming that your Yes or no is going into a yes/no (bit) type field. If so your query would need to have this added at the beginning

PARAMETERS [Please enter] Bit, so your sql code would look like this

Expand|Select|Wrap|Line Numbers
  1. PARAMETERS [Please enter] Bit;
  2. SELECT Orders.Order_ID, Orders.Order_date, Orders.Order_complete
  3. FROM Orders
  4. WHERE (((Orders.Order_complete)=[Please enter]));
  5.  
Oct 30 '08 #2
NeoPa
32,556 Recognized Expert Moderator MVP
It seems you're confusing Yes with "Yes".

Yes is a boolean value representing True (numerically -1), whereas "Yes" is a string value representing (You got it - "Yes").
Oct 30 '08 #3
nhat2991
2 New Member
Thanks for all the reply guys, my problem was solved.
Oct 31 '08 #4
NeoPa
32,556 Recognized Expert Moderator MVP
Very pleased to hear that :)

Welcome to Bytes!
Oct 31 '08 #5

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

Similar topics

2
by: mike | last post by:
ok here's the problem: I have a page that displays a form for user to select individual fields and to specify their own criteria which is used to query a database and then create an excel...
6
by: HKM | last post by:
Hello, I have a query engine that builds the SQL Query to obtain the recordSet. Following is an Exmaple Query that my QueryBuilder outputted SELECT * FROM BookInfo WHERE BookName LIKE...
1
by: Tero Partanen | last post by:
Hi, I have a small problem with MS ACCESS query. I want to be able to have a field, where I can input the search parameter, and then it will show me all the entires that match the parameter....
2
by: Matthew | last post by:
Hey , I have built a query which takes values from unbounded fields on a form, and it all works except for one thing. I have a few fields in my query that are dates. I also have a start and...
7
by: Tony Williams | last post by:
Does DLookup work in an expression in a query? I have this expression -(DLookUp("","tblmaintabs","= ")) Which works fine as a calculated control on a form but when I try to use it in a query as an...
3
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
0
by: MLH | last post by:
I have an A97 query (qryVehiclesNowners2) that has a table field in it named . Depending on the selections made in a number of criteria choices on a form, a field on the form will have string...
3
by: Andy_Khosravi | last post by:
I have been trying to build a user friendly search engine for a small database I have created. I'm having some particular problems with one of my date fields. Here's the setup: I'm using...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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
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...
0
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.