471,579 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,579 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 2614
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.

Similar topics

1 post views Thread by Andy Frank | last post: by
1 post views Thread by Igor Kramarsich - EDIT | last post: by
2 posts views Thread by SKarnis | last post: by
5 posts views Thread by ApexData | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
1 post views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

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.