473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Return ALL records

Hi there, am using Access 2002 and am wondering if there is a way to set up a query so that if I don't make a selection for a parameter such as a department code, I would see all records, and if I do make a selection, I would only see records pertaining to that particular Department Code I selected. Am not sure if Access can do this or not.

Thank you VERY MUCH for your assistance.

KEscherich
Feb 13 '08 #1
3 1183
jaishu
22
Yes you can do that, but not very clear about your question, are you trying to display it in a form??

if you are using a query then , make your form's record source as "select * from table", and if you want it selectively, you can use filter..
hope this helps...????
Feb 13 '08 #2
FishVal
2,653 Expert 2GB
Hi, KEscherich.

I guess so far your query looks like
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField]=[Parameter] ...
  2.  
Change it to
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField]=[Parameter] OR IsNull([Parameter]) ...
  2.  
Regards,
Fish
Feb 13 '08 #3
NeoPa
32,556 Expert Mod 16PB
You could try :
Expand|Select|Wrap|Line Numbers
  1. ..... WHERE [SomeField] LIKE [Parameter] & '*' ...
but this is really only for string fields.
Feb 17 '08 #4

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

Similar topics

10
by: KENNY L. CHEN | last post by:
Dear experts, I have two tables in my Oracle 8i database: TEST (COL1,COl2,REC_NO) and TEST1 (COL1,COL2,REC_NO). Both tables are unique-indexed on (COL1,COL2,REC_NO). I think the following...
4
by: Ted | last post by:
Here's what I'm trying to do: I have a table, which I don't have administration over, with 4 interestingfields: RecordCount - an auto incrementing primary key CardNumber - integer CompanyID -...
3
by: Lance | last post by:
Hi, I used sp_addlinkedserver to link to a remote server through ODBC. When I execute select count(*) from LinkSrv.SI.DBO.SIHeader in SQL Query Analyzer. It returns 13705 records. But when I...
6
by: Toucan | last post by:
i need to retrieve the most recent timestamped records with unique names (see working query below) what i'm having trouble with is returning the next-most-recent records (records w/ id 1 and 3...
5
by: Petr Bravenec | last post by:
I have found that when I use the RETURN NEXT command in recursive function, not all records are returned. The only records I can obtain from function are records from the highest level of...
2
by: M.Stanley | last post by:
Hi, I have a problem..I'm doing a specific query where I'm joining fields from a table with appednded data (there are duplicate records, except for the date/time), and another query. I want the...
1
by: Jeff | last post by:
Hi I need to construct a SQL statement to return n records immediately following a specific date/time, but in descending order by date/time. Using TOP always gets n records immediately before...
6
by: John | last post by:
I've got a single table I need to query to return records that have no "related records." Table dataset example: 1. John, Biology 2. Dave, Math 3. Susan, Biology 4. Betty, Sociology The...
66
by: Johan Tibell | last post by:
I've written a piece of code that uses sockets a lot (I know that sockets aren't portable C, this is not a question about sockets per se). Much of my code ended up looking like this: if...
1
by: tjm0713 | last post by:
Not sure this can be done but here is my current situation. I have a table containing millions of records. Each record has 28 fields. One of the fields I am trying to return the single record for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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...
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...

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.