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

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 2746
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.Field2
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
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...
7
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...
1
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...
1
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...
2
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...
6
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...
1
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...
4
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...
5
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...
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
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
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...
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...

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.