Hi Gurus,
I have created simple query as
SELECT QUOTES.DATE, QUOTES.QUOTENO, QUOTES.SALESREP, QuoteItem.ITEM,
QUOTES.[JOB NAME], QUOTES.CUSTOMER, QUOTES.AMOUNT, QUOTES.[JOB NO],
QUOTES.DivisionID, QUOTES.STATUS
FROM QUOTES INNER JOIN QuoteItem ON QUOTES.QUOTENO = QuoteItem.QUOTENO
WHERE (((QUOTES.DATE) Between [enter the start date] And [enter the end
date]) AND ((QUOTES.SALESREP)=[enter the SALESREP]) AND
((QuoteItem.ITEM)=[enter the ITEM]))
ORDER BY QuoteItem.ITEM;
Now what I want to do is when I run this query it should let me input
more than one ITEM so that when I want to get report for more than one
ITEM. For exaple I want to see report of three ITEMs it should ask me
in pop up box 3 times so that I can input and IF I input just one item
than it should give me report of one item (presently I am able to input
one ITEM and it works).
Thanks in advance. 3 4925
On 17 Jan 2007 13:12:55 -0800, mu************@gmail.com wrote:
You could do something like this (using Northwind sample app):
SELECT Customers.*
FROM Customers
WHERE (((Customers.CustomerID)=[Give CustomerID1])) OR
(((Customers.CustomerID)=[Give CustomerID2]));
That's pretty ugly though. Much more elegant would be to use an IN
clause:
SELECT Customers.*
FROM Customers
WHERE (((Customers.CustomerID) IN ([Give CustomerIDs]));
Then you could enter as many comma-separated values as you wanted.
However, that doesn't work. MSFT is apparently unwilling to support
that. Next best thing is for you to compose this SQL string yourself,
and use it for your form or report.
Another suggestion is to use a form rather than all these popups. Then
for example the SalesRepID can come from a dropdown list of all
salesreps, and there is no chance of mistakes.
-Tom.
>Hi Gurus,
I have created simple query as
SELECT QUOTES.DATE, QUOTES.QUOTENO, QUOTES.SALESREP, QuoteItem.ITEM, QUOTES.[JOB NAME], QUOTES.CUSTOMER, QUOTES.AMOUNT, QUOTES.[JOB NO], QUOTES.DivisionID, QUOTES.STATUS FROM QUOTES INNER JOIN QuoteItem ON QUOTES.QUOTENO = QuoteItem.QUOTENO WHERE (((QUOTES.DATE) Between [enter the start date] And [enter the end date]) AND ((QUOTES.SALESREP)=[enter the SALESREP]) AND ((QuoteItem.ITEM)=[enter the ITEM])) ORDER BY QuoteItem.ITEM;
Now what I want to do is when I run this query it should let me input more than one ITEM so that when I want to get report for more than one ITEM. For exaple I want to see report of three ITEMs it should ask me in pop up box 3 times so that I can input and IF I input just one item than it should give me report of one item (presently I am able to input one ITEM and it works).
Thanks in advance.
Thanks Tom for oyur prompt response.
I am not expert in MS Access so I don't know how to create form for
report. So I just wish to get syntax for criteria which can let me
input more than one time. Can you palease guide me how can I make this
possible in following.
((QuoteItem.ITEM)=[enter the ITEM]))
Thanks
Tom van Stiphout wrote:
On 17 Jan 2007 13:12:55 -0800, mu************@gmail.com wrote:
You could do something like this (using Northwind sample app):
SELECT Customers.*
FROM Customers
WHERE (((Customers.CustomerID)=[Give CustomerID1])) OR
(((Customers.CustomerID)=[Give CustomerID2]));
That's pretty ugly though. Much more elegant would be to use an IN
clause:
SELECT Customers.*
FROM Customers
WHERE (((Customers.CustomerID) IN ([Give CustomerIDs]));
Then you could enter as many comma-separated values as you wanted.
However, that doesn't work. MSFT is apparently unwilling to support
that. Next best thing is for you to compose this SQL string yourself,
and use it for your form or report.
Another suggestion is to use a form rather than all these popups. Then
for example the SalesRepID can come from a dropdown list of all
salesreps, and there is no chance of mistakes.
-Tom.
Hi Gurus,
I have created simple query as
SELECT QUOTES.DATE, QUOTES.QUOTENO, QUOTES.SALESREP, QuoteItem.ITEM,
QUOTES.[JOB NAME], QUOTES.CUSTOMER, QUOTES.AMOUNT, QUOTES.[JOB NO],
QUOTES.DivisionID, QUOTES.STATUS
FROM QUOTES INNER JOIN QuoteItem ON QUOTES.QUOTENO = QuoteItem.QUOTENO
WHERE (((QUOTES.DATE) Between [enter the start date] And [enter the end
date]) AND ((QUOTES.SALESREP)=[enter the SALESREP]) AND
((QuoteItem.ITEM)=[enter the ITEM]))
ORDER BY QuoteItem.ITEM;
Now what I want to do is when I run this query it should let me input
more than one ITEM so that when I want to get report for more than one
ITEM. For exaple I want to see report of three ITEMs it should ask me
in pop up box 3 times so that I can input and IF I input just one item
than it should give me report of one item (presently I am able to input
one ITEM and it works).
Thanks in advance.
On 18 Jan 2007 06:52:53 -0800, mu************@gmail.com wrote:
Isn't that what I did in my first suggestion: use an OR clause to
string several parts together. Perhaps this is clearer:
WHERE (((QUOTES.DATE) Between [enter the start date] And [enter the
end date]) AND ((QUOTES.SALESREP)=[enter the SALESREP]) AND
(((QuoteItem.ITEM)=[enter first ITEM])) OR ((QuoteItem.ITEM)=[enter
second ITEM])))
etc.
-Tom.
>Thanks Tom for oyur prompt response.
I am not expert in MS Access so I don't know how to create form for report. So I just wish to get syntax for criteria which can let me input more than one time. Can you palease guide me how can I make this possible in following.
((QuoteItem.ITEM)=[enter the ITEM]))
Thanks
Tom van Stiphout wrote:
>On 17 Jan 2007 13:12:55 -0800, mu************@gmail.com wrote:
You could do something like this (using Northwind sample app): SELECT Customers.* FROM Customers WHERE (((Customers.CustomerID)=[Give CustomerID1])) OR (((Customers.CustomerID)=[Give CustomerID2]));
That's pretty ugly though. Much more elegant would be to use an IN clause: SELECT Customers.* FROM Customers WHERE (((Customers.CustomerID) IN ([Give CustomerIDs]));
Then you could enter as many comma-separated values as you wanted. However, that doesn't work. MSFT is apparently unwilling to support that. Next best thing is for you to compose this SQL string yourself, and use it for your form or report.
Another suggestion is to use a form rather than all these popups. Then for example the SalesRepID can come from a dropdown list of all salesreps, and there is no chance of mistakes.
-Tom.
>Hi Gurus,
I have created simple query as
SELECT QUOTES.DATE, QUOTES.QUOTENO, QUOTES.SALESREP, QuoteItem.ITEM, QUOTES.[JOB NAME], QUOTES.CUSTOMER, QUOTES.AMOUNT, QUOTES.[JOB NO], QUOTES.DivisionID, QUOTES.STATUS FROM QUOTES INNER JOIN QuoteItem ON QUOTES.QUOTENO = QuoteItem.QUOTENO WHERE (((QUOTES.DATE) Between [enter the start date] And [enter the end date]) AND ((QUOTES.SALESREP)=[enter the SALESREP]) AND ((QuoteItem.ITEM)=[enter the ITEM])) ORDER BY QuoteItem.ITEM;
Now what I want to do is when I run this query it should let me input more than one ITEM so that when I want to get report for more than one ITEM. For exaple I want to see report of three ITEMs it should ask me in pop up box 3 times so that I can input and IF I input just one item than it should give me report of one item (presently I am able to input one ITEM and it works).
Thanks in advance.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brad |
last post by:
I have an sql query that has specific criteria (like state='PA' or
state = 'NJ'...) and would like to be able to have the user specify
the criteria dynamically either through the web or from...
|
by: Marius Kaizerman |
last post by:
Hi,
I have a report that is a based on a query.
One of the fields in the query is "time of sale", which is a date
field that holds the sales dates (day,month,year).
I want to use that field as...
|
by: Mark Roughton |
last post by:
I have a form where the users need to view records for various
criteria, one of which is a date field on which they may wish to view
all related data for the selected date, for all dates upto and...
|
by: waynetheengineer |
last post by:
Hi,
I was wondering if anyone had any suggestions on my database:
I have a form that accepts user input into a single text box. When the OK button is hit, a query should search for all records...
|
by: vaiism |
last post by:
I am creating a report that outputs the contact information and details about a water treatment plant, and needs to include information about people who work there.
If I tie all the information...
| |
by: mmueller |
last post by:
I am new to reporting services 2005 (reporting in Access for years and older versions of Reporting Services from time to time) and this is probably a dumb question... but I have no internal resources...
|
by: cmartin1986 |
last post by:
First of all I want to thank all of you that have helped me in the past this is an awesome fourm.
My problem today is I have a database that builds charts that are viewed by a large group every...
|
by: Coll |
last post by:
I have a database that produces different "cuts" of data for the user
to export into excel. The database essentially opens queries using
different criteria to filter the data as the user wants it....
|
by: Brett |
last post by:
Hello,
Is it possible to have just one criteria and have it apply to a group
of queries?
I am trying to create a report with the separate results of 4 queries
based on a prompt for the user...
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |