By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

Combobox Continuous Form Limit Data with VBA

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.