Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

select "all" in a query

Posted on 2004-08-01
1
Medium Priority
?
275 Views
Last Modified: 2010-04-17
i am would like to run a query that would select  "all" outstanding  reports from various divisions where i would still have the option of selecting the reports by division below is the code
SELECT DISTINCT DailyReport.divisioin
FROM DailyReport
WHERE (((DailyReport. divisioin)=[Forms]![Search Form]![comboboxsubdivision]));
 thank you
0
Comment
Question by:wwstudioinc
1 Comment
 
LVL 3

Accepted Solution

by:
ehartfield2002 earned 250 total points
ID: 11689389
If I understand you correctly,  using one query you'd like to be able to select all reports or optionally only those reports from a selected division.  Here's the code:

SELECT DISTINCT DailyReport.divisioin
FROM DailyReport
WHERE (((DailyReport. divisioin) Like [Forms]![Search Form]![comboboxsubdivision] & *));

If comboboxsubdivision = "" then, the query selects all records.  Otherwise, it only selects one division's records.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Six Sigma Control Plans
Loops Section Overview

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question