Solved

select "all" in a query

Posted on 2004-08-01
1
266 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 125 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

825 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