Working in MS Access 2007.
Hello, So Im creating a small database for a budget and Im trying to create 3 cascading combo boxes on a form (areabox2 , devbox2, entitybox2) . I have it right now so that that
devbox2 is based on areabox2
and
entitybox2 is based on devbox2
BUT!!!!!!!
I want entitybox2 to be based on both areabox2 and devbox2
Parameters are
Table = Budget Info
areabox2 data = [Budget Info].[Project Area]
devbox2 data = [Budget Info].Development
entitybox2 data = [Budget Info].Entity
This this the code im currently using
Private Sub areabox2_AfterUpdate()
devbox2.RowSource = "Select DISTINCT [Budget Info].Development " & _
"FROM [Budget Info] " & _
"WHERE [Budget Info].[Project Area] = '" & areabox2.Value & "' " & _
"ORDER BY [Budget Info].[Development];"
Me.devbox2.Requery
End Sub
Private Sub devbox2_AfterUpdate()
entitybox2.RowSource = "Select DISTINCT [Budget Info].Entity " & _
"FROM [Budget Info] " & _
"WHERE [Budget Info].[Development] = '" & devbox2.Value & "' " & _
"ORDER BY [Budget Info].[Entity];"
Me.entitybox2.Requery
End Sub
Im thinking that i have to add a second WHERE clause to the devbox2_AfterUpdate() but i dont know how???
Thanks in advance for any help.
Hello, So Im creating a small database for a budget and Im trying to create 3 cascading combo boxes on a form (areabox2 , devbox2, entitybox2) . I have it right now so that that
devbox2 is based on areabox2
and
entitybox2 is based on devbox2
BUT!!!!!!!
I want entitybox2 to be based on both areabox2 and devbox2
Parameters are
Table = Budget Info
areabox2 data = [Budget Info].[Project Area]
devbox2 data = [Budget Info].Development
entitybox2 data = [Budget Info].Entity
This this the code im currently using
Private Sub areabox2_AfterUpdate()
devbox2.RowSource = "Select DISTINCT [Budget Info].Development " & _
"FROM [Budget Info] " & _
"WHERE [Budget Info].[Project Area] = '" & areabox2.Value & "' " & _
"ORDER BY [Budget Info].[Development];"
Me.devbox2.Requery
End Sub
Private Sub devbox2_AfterUpdate()
entitybox2.RowSource = "Select DISTINCT [Budget Info].Entity " & _
"FROM [Budget Info] " & _
"WHERE [Budget Info].[Development] = '" & devbox2.Value & "' " & _
"ORDER BY [Budget Info].[Entity];"
Me.entitybox2.Requery
End Sub
Im thinking that i have to add a second WHERE clause to the devbox2_AfterUpdate() but i dont know how???
Thanks in advance for any help.