473,614 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I limit a Combo Box list?

1 New Member
My issue probably has a simple answer.

I want to limit a populated combo box to items that are NOT in use in another table. I have a Table with a field that looks up values from another table via a combo box. As I select items from that combo box list, I would like for the list to automatically remove that selection from the combo box list so it wont be availble to select. (And have it add any item that I change or remove from the tabe) The list is quite long and having it populated with every item is cumbersome to go through each time.

Please let me know if I need to explain further.
Any help is appreciated.

James
Dec 29 '06 #1
2 2375
nico5038
3,080 Recognized Expert Specialist
Best to make the rowsource to exclude these.
Goto the QBE editor and place both tables.
JOIN the tables by using drag and drop on the needed ID's.
Double-click the JOIN line and select option 2 or 3 to make the "main table" the one for display.
Now place besides the needed combofields the ID of the "not in table" table.
Give that ID the criteria:
Is Null
(There should be NO surrounding quotes ! )

Now place that query in the combo and check the result.

Nic;o)
Dec 29 '06 #2
NeoPa
32,566 Recognized Expert Moderator MVP
You may need to do a requery too somewhere if your form affects the table that is being checked against.
Where you put this will depend on how you are using it and what updates are being made.
Dec 30 '06 #3

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

Similar topics

3
8205
by: Bob Alston | last post by:
I am using a combo box to select the key to records and then go to the selected record on my form. Works well. However, the list, which contains people names, is rather long. What I would like to do is to allow entry of one or more letters of the beginning of the last name, like "j" for someone named Johnson (or Johnston) , where the list in the combo box will only show names equivalent to a "like {j*}" clause. So far it appears...
3
6638
by: deko | last post by:
Is there any way to limit the number of records loaded into a ListBox? I looked at qdf.MaxRecords (to apply to the query that is the RowSource of the ListBox) but that only applies to ODBC data sources. I also looked at Tools > Options > Edit/Find and tried setting the "Don't display lists where more than this number of records read:" property, but that doesn't help. The List Box in question is supposed to allow scrolling/browsing of...
4
18413
by: Rabbit | last post by:
Hi, I've been using MS Access to devleop applications for long time, I like a feature called "Limit To List" when setting combo box in design time (accept text only when matches one of the listed choices). Does anyone know a simple way to implement this feature on Windows form for ..Net developement? I've been searching this topic on lots of different technical resource, but I still can't it. I'm very appreciate anyone can give me a...
4
1919
by: tlyczko | last post by:
I read about limiting combo boxes' list data, for example, limiting the list of values in the second combo based on values in the first combo, and I found the Dev Ashish site link. I have two combos based on lookups of very small tables, Audit Descriptions and Programs. Combo 1: Audit Descriptions has Comprehensive, Fire Safety, Medical, MSC, Snapshot. Combo 2: Programs has A, B, C, D, E, F, G, H (for example).
2
2441
by: kiranmn75 | last post by:
I want to dynamically populate a combo box through javascript. Data is coming from a array. Sometimes data list may contain items in excess of 2000. Explorer takes more than 5 seconds to populate the combo (for a list of 2500). Can anybody optimize the code. I tried Duffs devise instead of 'for loop', but no improvement.
2
1647
by: claudia.carlotti | last post by:
Anyone knows how to avoid the limit to 36000 records that access has with a combo box? Any help will be appreciated. Many Thanks... Claudia
2
1645
by: jwolfley | last post by:
I'm a complete noob so excuse my ignorance. I'm looking for a simple drop down list on a form that limits the choices to foldernames that relate to the customer. I have three tables named customer, website and orders. I have a form named customer. I can lookup a custom and see just the domains he owns on a subform 'orders subform' that pulls info from the orders table. What I want to do is add a combo box to the 'orders subform'...
1
4148
by: injanib via AccessMonster.com | last post by:
is it possible that if the limit to list property of a combobox is set to true the focus is passed onto another field? What I mean is that I have a combo box with the limit to list property set to true. the Notinlist event procedure prompts that the entry is not in the list and if I want to add it to the list. This is where it becomes tricky. Some times I want to add the new data in the list if it is a new permanent employee, which then it...
0
8142
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8294
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8444
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7115
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5549
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4058
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.