473,385 Members | 1,720 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,385 software developers and data experts.

Deleting Items from a combo box once selected

6
Hi All,

Thanks to those that have helped me before.

It’s been a couple of weeks since I posted (I can only play with this during my spare time at work) so here’s the set up again- we receive many “little” shipments of four different versions of something. We combine these into one “big” shipment which we send out to be processed.

Currently I have one main form for the big shipments, based off of a “big shipment” table and a subform, based off of a query. In the subform (a continuous form), the user selects the little shipments to be included in the big shipment from a combo box (based of a query). The quantity of each version, for each little shipment, auto-fill and I get a grand total for the big shipment.

I want the user to only be able to select little shipments that have not been included in a big shipment from the combo box. There is a yes/no field in the little shipments table and the combo box is filtered to let only those marked “no” show up. When a user selects a little shipment, then the Sent field is automatically updated to Yes.

Everything works except when I close the main form and open it again, all the entries in the combo boxes have disappeared. Which, now that I think about it, makes sense. If the combo box is filtered, then the ones marked “no” will no longer appear in the query, so they aren’t going to appear in the combo box.

However, I am not sure how to get around this. Can someone point me in the right direction? Is there another way of doing the same thing?

Thanks
Chez
Dec 13 '07 #1
1 2402
NeoPa
32,556 Expert Mod 16PB
It seems to me you're asking it to do two different (mutually incompatible) things on the same form.
If the form needs to show existing records which have "little shipments" already selected and assigned, you simply cannot restrict the ComboBox to those items that haven't been selected yet.
You could try a check in the AfterUpdate procedure for the ComboBox that cancels the update if you try to add an already used item.
Dec 14 '07 #2

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

Similar topics

4
by: Georges Heinesch | last post by:
Hi. I have a combobox with a value list of 4 items. My code needs to know the number of items in that combobox. How can I use VBA to get the number of items in a combobox? TIA --
1
by: Tim | last post by:
Hi, I'm very new to .NET and am programming in C#. I have a web application where i have two list boxes. Its kind of like a shopping card where you can add items from one 'locations' list box to...
10
by: A_PK | last post by:
I am writing mobile application using Vb.net when i click the last row of list view, and try to delete it.... will promtpy the following message "Additional information:...
2
by: Chesne | last post by:
I would like to be able to utilise a combo box where once an item has been selected then that item no longer appears in that list. Is there some code anyone has which will achieve this? If I...
4
by: datasec23 | last post by:
I have read through the threads and have been unable to find an answer to my simple question and this newbie is stuck. Here is what I am trying to do. I have a combo box that contains a list of...
2
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg...
2
by: Brad Pears | last post by:
I am working on a new vb.net 2005 project using SQL server 2000 as the backend db. I have a listview where control I want a user to be able to select either just one or multiple rows in the...
6
by: henry.onovwaka | last post by:
Can someone help on this problem. I have a combo box of, say three Items, selected from a table that serves as the lookup: E.g. 1 Earth, 2 Pine, 3 Earth Grave The combo box is on the subform. ...
2
by: mygirl22 | last post by:
Hi, I used this code to created 2 combo boxes General and Specific...and Only show Specific (Combo B) when Combo A is chosen..... What i need now is to know how to assign specific values to the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.