473,404 Members | 2,114 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.

How to Filter Lookup List?

I have a Form Where i Need to see Values from a another table's field so i have created a lookup field, that works perfectly

but i wish to filter that lookup list with values which are not yet Added??

Table -- TblSup Field -- SCID

Table -- TblRec Field -- LPSCID

i have a lookup list from TblRec!LPSCID field so i can view values from TblSup!SCID Field
But Wish to Filter so that it shows only the values which are not already present in TblRec!LPSCID Field???
Aug 14 '20 #1
2 3056
twinnyfo
3,653 Expert Mod 2GB
I think this is what you are getting at:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblRec.LPSCID 
  2. FROM tblRec 
  3. LEFT JOIN tblSup 
  4. ON tblRec.LPSCID = tblSup.SCID 
  5. WHERE tblSub.SCID IS Null
  6. GROUP BY tblRec.LPSCID 
  7. ORDER BY tblRec.LPSCID;
This creates a join between the two tables, and lists all records in tblRec, whether or not they are listed in tblSup. However, by adding the WHERE Clause, it limits the list to only those records that are not found in tblSup.

I think I got the syntax right for this. Haven't tested it - just freehanding this here.

Hope this hepps!
Aug 14 '20 #2
isladogs
456 Expert Mod 256MB
The simplest way to do this is by using the unmatched query wizard
The result will probably be something like

Expand|Select|Wrap|Line Numbers
  1. SELECT tblRec.LPSCID 
  2. FROM tblRec 
  3. LEFT JOIN tblSup 
  4. ON tblRec.LPSCID = tblSup.SCID 
  5. WHERE tblSub.SCID IS Null;
In other words, a simplified version of twinnyfo's code without the GROUP BY & ORDER BY clauses

OR possibly the other way round

Expand|Select|Wrap|Line Numbers
  1. SELECT tblSub.SCID
  2. FROM tblSub 
  3. LEFT JOIN tblRec
  4. ON tblRec.LPSCID = tblSup.SCID 
  5. WHERE tblRec.LPSCID IS Null;
Aug 16 '20 #3

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

Similar topics

8
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and...
3
by: xmp333 | last post by:
Hi, Is there a way to use a 2 column table as a lookup for a combo box, having one field show up on the form, and the other field actually written to the output table? Here's an example: I...
1
by: Dave | last post by:
I have a problem which I know there is an answer to but have so far been unsuccessful in finding it. It is quite simple in theory. I have created a form which uses a table for lookup values and...
0
by: gerry | last post by:
I want to populating an asp list box from a simple access lookup list (single column not a table.)I don't want to create tables just for lookups as the values will be descriptive only and will...
3
by: Tony | last post by:
Hi, I wonder why when I do a filter by form, some text fields show all the data in the table in the combo box and others only show two items, Is Null and Not Is Null. I want to show all data,...
10
by: charles.hebert | last post by:
Hi, Can anybody tell me how to to find the nearest value to zero in a list ? To do that, i'm using list comprenhension : Something simpler ?
4
by: Cron | last post by:
Hi can someone give me a hand with this please? I'm trying to build a search filter that scans through a list of client names in a database as you type into a text box and filters the form records...
3
by: luciegiles | last post by:
I have two lookup lists in a database tlkpLocality and tlkpWorkBase. I want the response in tlkpLocality to limit the options in tlkpWorkBase but don't know how to do this. Thanks.
8
by: CatchSandeepVaid | last post by:
Say i have one-to-many relationship between Product and ProductNames. So Product has a List of ProductNames. Actually we are using List for productNames.and for list, in order to maintain...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.