Based on one combobox selection ,display value for two combobox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sandy1992
    New Member
    • May 2015
    • 57

    Based on one combobox selection ,display value for two combobox

    Hi friends,

    What I am trying to do is simple. I have 3 combobox's on one form.

    -cboSystem
    -cboRelease
    -cboProject

    Now, based on what I select in cboSystem, the values in cboRelease & cboProject should be filtered.

    Also, there are 2 tables:
    -Release(ID,Syst em,Release)
    -Project(ID,Syst em,ProjectName)

    I would like to mention that , i have used below code to filter cboRelease based on cboSystem.

    Code:
    Dim stRelease As String
    stRelease = "SELECT [Release].[ID],[Release].[ReleaseName] FROM Release WHERE [Release].[System] = '" & Me.cboSystem.Value & "';"
        Me.cboRelease.RowSource = stRelease
        Me.cboRelease.Requery
    But, when i use same kind of code for cboProject, it is not working.

    Code:
    Dim stProject As String
    stProject = "SELECT [Project].[ID],[Project].[System],[Project].[ProjectName] FROM Release WHERE [Project].[System] = '" & Me.cboSystem.Value & "';"
        Me.cboProject.RowSource = stProject
        Me.cboProject.Requery
    The popup message displays like;
    "Enter Parameter Value" Project.ID=
    Project.System=
    Project.Project Name=

    At last cboProject displays nothing but blank.

    Before selecting anything all the combobox's are displaying all information(unf iltered).

    I guess i gave required informations.

    I just want to figure out what mistake i have done in the coding.

    I would appreciate all kind of help.

    Thank you :)
  • Sandy1992
    New Member
    • May 2015
    • 57

    #2
    Omg!

    My bad!

    Everything is working fine now.

    The only mistake was TABLE NAME.

    Instead of using Project I was using Release.

    Well I must say this is the simplest way to make this work.

    Still I would like to Thank you guys for solving my so many problems. :)

    Comment

    Working...