473,699 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combobox Continuous Form Limit Data with VBA

I have a combobox on a continuous form that has a recordsource that is
set upon Form_Load event via VBA (based on initial form data and
external form data entered). For data entry purposes the Combobox's
value is saved to *another* field (text-field) in the appropriate table
(this text-field is not visible in the Continuous Form); so the
combobox is pretty much just for data-lookup purposes (so the user does
not have to type anything).

Now, I need to be able to remove/add a specific entry from the Combobox
depending on what the user has selected in the other Comboboxes on
continuous form.

For example:
Say there are 4 entries: A, B, C, D that can be selected from the
Combobox on this continuous form. The user selects "B" in the first
Combobox... then I would like to have the remaining Comboboxes allow
the user to select from the remaining entries (A, C, D). Now if the
user goes back and changes the first entry from "B" to "A", for
example, then I would like to have the remaining Comboboxes contain the
remaining 3 entries (B, C, D).

I'm wondering how I can go about doing this in VBA or whatever other
methods; or is this even possible?

Many thanks in advance to any and all help!

Jun 7 '06 #1
1 2773
For example:
Say there are 4 entries: A, B, C, D that can be selected from the
Combobox on this continuous form. The user selects "B" in the first
Combobox... then I would like to have the remaining Comboboxes allow
the user to select from the remaining entries (A, C, D). Now if the
user goes back and changes the first entry from "B" to "A", for
example, then I would like to have the remaining Comboboxes contain the
remaining 3 entries (B, C, D).

I'm wondering how I can go about doing this in VBA or whatever other
methods; or is this even possible?

Many thanks in advance to any and all help!


Continuous forms may screw this up, but you could use a left join to
get all the values in TableA that are not in TableB. (or query). Then
you just list those.

SELECT A.Field1,...
FROM tableA as A LEFT JOIN tableB as B ON A.Field1=B.Fiel d2
AND B.Field2 IS NULL.

(or something along those lines.)

Jun 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3068
by: Steve | last post by:
I have an unbound combobox in the form header of a continuous form. The selection in the combobox sets the where clause in a querydef which determines QryPFrmInventoryManagement. The following code is in the afterupdate event of the combobox: Me.RecordSource = "QryPFrmInventoryManagement" Me!ItemCount = Me.RecordsetClone.RecordCount & " Items" MsgBox Me.RecordsetClone.RecordCount & " Items"
7
8520
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way of doing it. I have a table with products, tblProducts, some of them are Active while others are Inactive. The form shows all the products purchased by a customer, both Active and Inactive in a ComboBox, cbProducts. My client wants to view all...
1
4209
by: Andy Frank | last post by:
I have a tabular form that has a combo box on it that is reading from a database. When that combobox changes, I want it to lookup a database record to get a value and set the value into another text field on the same form and record. Everything works fine except for that the change event updates everything on the form not just the current recordset that I am in and where the change event was started. Here is my code any help is...
1
2085
by: Igor Kramarsich - EDIT | last post by:
Hello, I simple not see solution to this problem. I have one form with subform. In form is define number of job, type of job, sector of organization and date of job. Subform is a query (as I need to made calculation every line) define by number of job (what is connection with main form), person who made job, kind of work and other. Problem is that kind of work grow so much. From started around 10, now is
2
1787
by: SKarnis | last post by:
We are trying to rebuild a current Access 2002 (XP) mdb program to VB.NET with a SQL database - we are having problems with a suitable combobox. There are many threads discussing multiple column comboboxes in .NET. We are having success with the multiple columns similar to the combobox from Access 2002 (XP). Our biggest problem is speed. In a form in Access 2002, our combobox is able to load data in a table in separate Access database...
6
2879
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox and the coresponding 'Id' from the lookup table is to be inserted into the field of the new record. I have two simple tables. "tblPerson" is the data table. The lookup
1
4859
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1 to limit what is displayed in bound combo box C2. When I display Tbl-A records on a continuous form, and navigate away from record 1 to record 2, the previously entered data displayed in C2 for record 1 disappears from
4
8473
by: madereal | last post by:
howdy scriptors… here’s my question: Project Background: I’m creating a database that will hold questionnaire data. Situation: I would like to set up a combobox with a changing rowsource property on a continuous form. I have created a query for the record source so that the text value of the rowsource property is included as a separate field for each record. I have call this field: and an example of the text is: (1;Yes;2;No). ...
5
8111
by: ApexData | last post by:
I have a ComboBox, when dblClicked, displays the combobox's row content in a continuous subform. Changes can be made to this content in the subform and then closed. The ComboBox needs to be requeried to immediately reflect these changes. The problem is that I can't requery in the OnDblClick event of the ComboBox because the event completes once the subform is launched. I guess I could requery the combobox from the Close event of the...
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8612
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
9171
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...
0
8880
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
5869
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
4373
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...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.