Combo Box Populated with child, parent and grandparent

QueenOfKings

Registered User.
Local time
Today, 11:29
Joined
Oct 13, 2014
Messages
11
Hello, I'm making a form for notes on a project.

The project has Grandparent, Parent and Child (3 levels) of entities. However, I want to be able to make notes on all three levels. So, for instance. Say it went like this:

Grandparent = life forms

Parent (mammals) = dogs, cats, etc.

Child = breeds

THen from my combo box I want to be able to choose like

Note 1: dogs

Note 2: cats

Note 3: Maine Coone

Note 4: rabbits
I know I can run a query combining all the entries for all the tables and then feed that into the combo box, but I want the entries on the notes to be connected to the child, parent and grandparent tables. Is that possible?

Otherwise, how would you do this? Would I have to have 3 separate combo boxes?

Thanks for any help!
 
the cboGrand would have query qsGrands, that shows life forms.
when an item is chosen, use the cboGrand_AFTERUPDATE() event to
refresh cboParent (below)

Code:
sub cboGrand_AFTERUPDATE() 
  cboParent.requery
end sub

the cboParent query would use query qsParent ,which looks at cboGrand
select * from table where [Kingdom]=forms!frmMain!cboGrand

same with cboParent, in the afterupdate event, refresh the cboChild combo.

Code:
sub cboParent_AFTERUPDATE() 
  cboChild.requery
end sub

the cboChild query , qsChild, would look at cboParent,
select [breeds] from table where [Phylum]=forms!frmMain!cboParent
 
Hi, what you are talking about is cascading combo boxes, I think. I know how to do that, that's not what I'm trying to do. In the case of CCBs, you have to choose an item from the last table that it is filtered down to. I want to be able to choose an item from any of the 3 tables.

For instance:

MAMMAL filters down to DOG which filters down to ST BERNARD. With a cascading combo box, I'd have to choose St Bernard. But what if I want to choose ST Bernard, or Dog or Mammal? I'm making notes on EVERYTHING. Not just one level. Is that more clear? (Thanks, btw).
 

Users who are viewing this thread

Back
Top Bottom