Filling in Combo Box from table (cascading)

R

RebeccaMinAR

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery
 
R

RebeccaMinAR

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.
 
K

Klatuu

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;
 
R

RebeccaMinAR

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

Klatuu said:
That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

RebeccaMinAR said:
I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.
 
K

Klatuu

Post your code, please. Also include the data type for each field in the
table.

RebeccaMinAR said:
When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

Klatuu said:
That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

RebeccaMinAR said:
I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

Klatuu said:
Post your code, please. Also include the data type for each field in the
table.

RebeccaMinAR said:
When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

Klatuu said:
That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

I should have been more clear. I need to see the Row source code for all the
combos.

RebeccaMinAR said:
All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

Klatuu said:
Post your code, please. Also include the data type for each field in the
table.

RebeccaMinAR said:
When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

Klatuu said:
I should have been more clear. I need to see the Row source code for all the
combos.

RebeccaMinAR said:
All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

Klatuu said:
Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


RebeccaMinAR said:
The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

Klatuu said:
I should have been more clear. I need to see the Row source code for all the
combos.

RebeccaMinAR said:
All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

Thank you so much!! This made it work perfectly - you have saved me from
beating my head into the wall for the rest of the afternoon!

Klatuu said:
Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


RebeccaMinAR said:
The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

Klatuu said:
I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

Klatuu said:
Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


RebeccaMinAR said:
The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

Klatuu said:
I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

SELECT DISTINCT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;
will return one item for each value regardless of the number of times the
value occurs in the table.

(There are a few dents in my wall, too :)

RebeccaMinAR said:
One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

Klatuu said:
Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


RebeccaMinAR said:
The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

:

I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

Thanks again - you wouldn't happen to be near Little Rock, AR would you? I
think I owe you lunch. :)

Klatuu said:
SELECT DISTINCT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;
will return one item for each value regardless of the number of times the
value occurs in the table.

(There are a few dents in my wall, too :)

RebeccaMinAR said:
One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

Klatuu said:
Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


:

The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

:

I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

Fort Worth, Texas
We could meet in Texarkana :)

RebeccaMinAR said:
Thanks again - you wouldn't happen to be near Little Rock, AR would you? I
think I owe you lunch. :)

Klatuu said:
SELECT DISTINCT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;
will return one item for each value regardless of the number of times the
value occurs in the table.

(There are a few dents in my wall, too :)

RebeccaMinAR said:
One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

:

Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


:

The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

:

I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
R

RebeccaMinAR

Next time I'm going down there, I'll have to drop you a line. Thanks for
keeping me from losing my last shreds of sanity on this project - me and my
big mouth, offering to program a database for a new department without
knowing jut how complex it was going to be.

Klatuu said:
Fort Worth, Texas
We could meet in Texarkana :)

RebeccaMinAR said:
Thanks again - you wouldn't happen to be near Little Rock, AR would you? I
think I owe you lunch. :)

Klatuu said:
SELECT DISTINCT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;
will return one item for each value regardless of the number of times the
value occurs in the table.

(There are a few dents in my wall, too :)

:

One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

:

Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


:

The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

:

I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
K

Klatuu

LOL, been there done that.
I took a contract to write an inventory system in Dbase (long time ago), but
I didn't know Dbase. I just wanted some incentive to learn it. That I did,
but I think I ended up working for about $2.12 per hour. (And it made me what
I am today :)

RebeccaMinAR said:
Next time I'm going down there, I'll have to drop you a line. Thanks for
keeping me from losing my last shreds of sanity on this project - me and my
big mouth, offering to program a database for a new department without
knowing jut how complex it was going to be.

Klatuu said:
Fort Worth, Texas
We could meet in Texarkana :)

RebeccaMinAR said:
Thanks again - you wouldn't happen to be near Little Rock, AR would you? I
think I owe you lunch. :)

:

SELECT DISTINCT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;
will return one item for each value regardless of the number of times the
value occurs in the table.

(There are a few dents in my wall, too :)

:

One other thing, if you have a second - how do I filter these results to
distinct records? (i.e. there are many instances of each Vertical, etc. in
the table - the only field that is always unique is project name.). Thanks
again - this is going to save me a LOT of time.

:

Darn it!
I forgot. When used like this, the Me. is not understood. You can do
either
SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]= cboVertical;

or

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical]=
Forms!MyFormName!cboVertical;

Sorry about that.


:

The row source for Vertical is TBL V-L-A Data
The row source for LOB is SELECT [LOB] FROM [TBL V-L-A Data] WHERE
[Vertical]=Me.cboVertical;
The row source for Application is SELECT [Application] FROM [TBL V-L-A Data]
WHERE [LOB]=Me.cboLOB;

That's as far as I've taken it - once those three work, then I can get the
rest.

Thanks again!

:

I should have been more clear. I need to see the Row source code for all the
combos.

:

All of the fields are text fields.

Code (I'm assuming you mean the event procedure) is:
---------------------
Private Sub Vertical_AfterUpdate()
Me.LOB.Requery

End Sub
----------------------------
Similarly set up for the other fields.

Thanks... I know it's not easy answering questions like this without having
the database in front of you.

:

Post your code, please. Also include the data type for each field in the
table.

:

When I follow your procedure, it asks me to retype my selection when I go to
the next box (e.g - when I select a Vertical, and then go to the LOB field,
it asks me for my Vertical selection again. If I type it in the dialogue box,
it brings me the correct list - but if I don't type it correctly or just hit
OK it returns no responses). It then lets me select an LOB - but when I do,
it takes me to a compile error and says that .requery "Method or Data Entry
no found". Is there something else I need to add?

Thanks so much for your help. If I can get this to cooperate, then some of
my other problems will go away as well.

:

That is because you are not using good naming practices. Best naming rule:
Use only letters, digits, and the underscore _
Never use spaces, special characters or reserved words.

When you use non standard naming, it is necessary to enclose the name in
brackets. You can even do it when good naming is used for clarity

SELECT [LOB] FROM [TBL V-L-A Data] WHERE [Vertical] = Me.cboVertical;

:

I've tried putting the Me.cboLOB.Requery in the After Update, and it seems to
be OK, but I'm not sure how to filter the way that you are describing. I've
tried putting SELECT LOB FROM TBL V-L-A Data WHERE Vertical = Me.cboVertical;
but it keeps coming back with an error - "Syntax Error in Query - incomplete
query clause". Am I putting this in the wrong place? I'm putting that
argument in the Row Source box for the combo box, and I've chosen Table/Query
as the Row Source Type. Thanks - I've got five or six other problems I'm
trying to solve, and I'm a bit overwhelmed.


:

This is a pretty simple process once you grasp the concept. Each combo's row
source has to be filtered on the previous combo's value. For example, the
LOB combo's row source needs to filter on the value in the Vertical combo:

SELECT LOB FROM MyTable Name WHERE Vertical = Me.cboVertical;

And so on.

Then in the After Update event of each combo, you requery the next combo:

Private Sub cboVertical_AfterUpdate()

Me.cboLOB.Requery



:

I'm working way above my skill level on this project, so I hope this is an
easy one.

I've got a form - FRM_Projects - that includes four combo boxes that need to
cascade. The table has four columns (Vertical, LOB, Application and Project
Name) that correspond to each of the four combo boxes. I need to set it up so
that when you select the Vertical for the project, the LOB box will display
only the LOB records that relate to the Vertical selected, and then when the
LOB is selected that it will only show the Application records that relate to
the LOB and the Vertical selected. There are duplicate records in each column
but the Project name, of course (there are 4 Vertical choices, and 12 LOB
choices, etc.). I am very unfamiliar with VB scripting and have been a
poweruser but not a developer for Access in the past - can someone help,
please? Thanks so much!!
 
D

David Hochhauser (DHeshMan

Hi,
I have a very similar, almost identical issue, but instead of using
forms I'm using the lookup within the table definition. I tried what you
suggested and came up with an odd side affect. The list in the drop down box
contained entries from doing the lookup on all the records instead of just
the current record. For simplicity I have made my example generic: I have
tables called Xs, Ys, XTypes, YTypes, and XYTypes.

Each X has a X_ID and is specified by its XType_ID (Xs is many-to-one with
XTypes).
Each Y has a Y_ID and is specified by its YType_ID (Ys is many-to-one with
YTypes).
Each X has multiple Ys (Xs is one-to-many with Ys).
Each XType can support only certain YTypes; however, multiple XTypes can
support the same YType. So I created the XYTypes table to handle the many to
many relationship between XTypes and YTypes.

Within the Ys table, I have a lookup for the X_ID.
Row Source = SELECT Xs.X_ID, XTypes.XType FROM Xs INNER JOIN XTypes ON
Xs.XType_ID=XTypes.XType_ID ORDER BY XTypes.XType;

Once the X_ID is selected I tried to filter the Row Source for the YType_ID
Row Source = SELECT YTypes.YType_ID, YTypes.YType, Xs.X_ID FROM (XTypes
INNER JOIN (YTypes INNER JOIN XYTypes ON YTypes.YType_ID=XYTypes.YType_ID) ON
XTypes.XType_ID=XYTypes.XType_ID) INNER JOIN Xs ON
XTypes.XType_ID=Xs.XType_ID WHERE (((Xs.X_ID)=[X_ID])) ORDER BY YTypes.YType;

If I then add 2 records in the Xs database each with a different XType_ID,
the drop down list for YType_ID displays the choices available for both
records, not just one. Any ideas?

DHeshMan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top