11 Replies - 8370 Views - Last Post: 25 February 2014 - 03:09 PM

#1 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:10 AM

I currently have a database that has a frm called "FrmMain"

I have two combo boxes that are called cboCategory and cboSreen
Then I have a multi-combo box with the list of problems that associated with each screen..
The multi-value combo box I want to filter only the choices that is base on the cboScreen but it show all.
Thank you for your time.

Attached image(s)

  • Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: Cascading combo Boxes and Multi-Value Combo Box

#2 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2493
  • View blog
  • Posts: 7,547
  • Joined: 15-January 14

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:24 AM

What code or configuration do you have for the combo boxes? How would you set up the filter in Access?
Was This Post Helpful? 0
  • +
  • -

#3 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:29 AM

View PostArtificialSoldier, on 19 February 2014 - 09:24 AM, said:

What code or configuration do you have for the combo boxes? How would you set up the filter in Access?

Option Compare Database


Private Sub cboCategory_AfterUpdate()
Me.cboScreenCredit.Requery
Me.cboScreen1Credit.Requery
Me.cboScreen2Credit.Requery
Me.cboProblemCredit.Requery
Me.cboProblem1Credit.Requery
Me.CboProblem2Credit.Requery


End Sub

Private Sub Form_Load()
Me.cboOptionsAllCredit = False
Me.lblScreenCredit.Visible = False
Me.lblScreen1Credit.Visible = False
Me.lblScreen2Credit.Visible = False
Me.cboScreenCredit.Visible = False
Me.cboScreen1Credit.Visible = False
Me.cboScreen2Credit.Visible = False
Me.lblOptionsCredit.Visible = False
Me.lblOptions1Credit.Visible = False
Me.lblOptions2Credit.Visible = False
Me.lblOptionsCredit.Visible = False
Me.cboOptionsCredit.Visible = False
Me.cboOptions1Credit.Visible = False
Me.cboOptions2Credit.Visible = False
Me.lblProblemCredit.Visible = False
Me.lblProblem1Credit.Visible = False
Me.lblProblem2Credit.Visible = False
Me.cboProblemCredit.Visible = False
Me.cboProblem1Credit.Visible = False
Me.cboProblem2Credit.Visible = False
Me.lblCommentCredit.Visible = False
Me.memoCommentCredit.Visible = False
Me.cboCategory = Null
Me.cboOptionsAllCredit = Null
Me.Command208.Visible = False
Me.Command209.Visible = False


End Sub

Private Sub cboOptionsAllCredit_AfterUpdate()
If Me.cboOptionsAllCredit = "Accepted" Then
Me.lblScreenCredit.Visible = False
Me.lblScreen1Credit.Visible = False
Me.lblScreen2Credit.Visible = False
Me.cboScreenCredit.Visible = False
Me.cboScreen1Credit.Visible = False
Me.cboScreen2Credit.Visible = False
Me.lblOptionsCredit.Visible = False
Me.lblOptions1Credit.Visible = False
Me.lblOptions2Credit.Visible = False
Me.lblOptionsCredit.Visible = False
Me.cboOptionsCredit.Visible = False
Me.cboOptions1Credit.Visible = False
Me.cboOptions2Credit.Visible = False
Me.lblProblemCredit.Visible = False
Me.lblProblem1Credit.Visible = False
Me.lblProblem2Credit.Visible = False
Me.cboProblemCredit.Visible = False
Me.cboProblem1Credit.Visible = False
Me.cboProblem2Credit.Visible = False
Me.lblCommentCredit.Visible = False
Me.memoCommentCredit.Visible = False
Me.lblCommentCredit.Visible = True
Me.memoCommentCredit.Visible = True
Else
If Me.cboOptionsAllCredit = "Pending" Then
Me.lblScreenCredit.Visible = True
Me.cboScreenCredit.Visible = True
Me.lblCommentCredit.Visible = True
Me.memoCommentCredit.Visible = True
cboScreenCredit.Requery
End If
End If


End Sub

Private Sub cboScreenCredit_AfterUpdate()
Me.lblOptionsCredit.Visible = True
Me.cboOptionsCredit.Visible = True
Me.cboScreenCredit.Requery

End Sub





Private Sub Command208_Click()
Me.lblScreen1Credit.Visible = True
Me.cboScreen1Credit.Visible = True
Me.cboScreen1Credit = Null
End Sub

Private Sub cboOptionsCredit_Click()
If Me.cboOptionsCredit = "Pending" Then
Me.lblProblemCredit.Visible = True
Me.cboProblemCredit.Visible = True
Me.Command208.Visible = True
Else
If Me.cboOptionsCredit = "Accepted" Then
Me.lblProblemCredit.Visible = False
Me.cboProblemCredit.Visible = False
Me.Command208.Visible = True
cboProblemCredit.Requery

End If
End If
End Sub

Private Sub cboProblemCredit_Dirty(Cancel As Integer)
Me.cboProblem IsNull
End Sub

Private Sub cboScreen1Credit_AfterUpdate()
Me.lblOptions1Credit.Visible = True
Me.cboOptions1Credit.Visible = True
Me.cboScreen1Credit.Requery

End Sub

Private Sub cboOptions1Credit_AfterUpdate()
If Me.cboOptions1Credit = "Pending" Then
Me.lblProblem1Credit.Visible = True
Me.cboProblem1Credit.Visible = True
Me.Command208.Visible = True
Else
If Me.cboOptions1Credit = "Accepted" Then
Me.lblProblem1Credit.Visible = False
Me.cboProblem1Credit.Visible = False
Me.Command208.Visible = True
cboProblem1Credit.Requery

End If
End If
End Sub

Private Sub cboProblem1Credit_AfterUpdate()
Me.cboProblem1Credit.Requery

End Sub

Private Sub Command209_Click()
Me.lblScreen2Credit.Visible = True
Me.cboScreen2Credit.Visible = True
Me.cboScreen2Credit = Null
End Sub

Private Sub cboScreen2Credit_AfterUpdate()

Me.lblOptions2Credit.Visible = True
Me.cboOptions2Credit.Visible = True
Me.cboScreen2Credit.Requery

End Sub

Private Sub cboOptions2Credit_Click()
If Me.cboOptions2Credit = "Pending" Then
Me.lblProblem2Credit.Visible = True
Me.cboProblem2Credit.Visible = True

Else
If Me.cboOptions2Credit = "Accepted" Then
Me.lblProblem2Credit.Visible = False
Me.cboProblem2Credit.Visible = False

Me.cboProblem2Credit.Requery

End If
End If
End Sub

Attached image(s)

  • Attached Image

This post has been edited by amyceres: 19 February 2014 - 09:33 AM

Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2493
  • View blog
  • Posts: 7,547
  • Joined: 15-January 14

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:36 AM

It looks like there is a guide here about how to link two comboboxes together:

http://office.micros...A001173058.aspx
Was This Post Helpful? 0
  • +
  • -

#5 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:46 AM

View PostArtificialSoldier, on 19 February 2014 - 09:36 AM, said:

It looks like there is a guide here about how to link two comboboxes together:

http://office.micros...A001173058.aspx



I have no problem in the linking of the first two combo box together. .I have the problem of filtering the multi-value combo to only reflect the choices of the cboScreen. it currently show all the choices for all the cboCategories and cboScreen

This post has been edited by amyceres: 19 February 2014 - 09:47 AM

Was This Post Helpful? 0
  • +
  • -

#6 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2493
  • View blog
  • Posts: 7,547
  • Joined: 15-January 14

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 09:47 AM

It should be the same process, the query for the problem box needs to include the value from the screen box.
Was This Post Helpful? 0
  • +
  • -

#7 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 10:23 AM

View PostArtificialSoldier, on 19 February 2014 - 09:47 AM, said:

It should be the same process, the query for the problem box needs to include the value from the screen box.



it didn't work....it still show everything.. frmMain is based on the tblCreditResults and I included the qryProblem table image.

Attached image(s)

  • Attached Image
  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#8 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2493
  • View blog
  • Posts: 7,547
  • Joined: 15-January 14

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 10:49 AM

It doesn't look like you've changed the Row Source property, it's getting all rows. There needs to be a WHERE clause there. The link I posted above shows how to do that.
Was This Post Helpful? 0
  • +
  • -

#9 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 12:41 PM

View PostArtificialSoldier, on 19 February 2014 - 10:49 AM, said:

It doesn't look like you've changed the Row Source property, it's getting all rows. There needs to be a WHERE clause there. The link I posted above shows how to do that.


Ok I got it...but now that everytime I open it the multi-value shows the previous records that I picked. How do I make it clear?
Thanks
Was This Post Helpful? 0
  • +
  • -

#10 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2493
  • View blog
  • Posts: 7,547
  • Joined: 15-January 14

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 19 February 2014 - 02:38 PM

I think you would need to reset the boxes that it depends on, you might just want to reset all boxes. Maybe there's a button that you click to get to that screen, or an event you can use when the form is loaded, where you can add the code to clear all of the selections. You might just be able to set them to null to clear them.
Was This Post Helpful? 0
  • +
  • -

#11 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 25 February 2014 - 12:53 PM

Hello scroll below

Attached image(s)

  • Attached Image
  • Attached Image
  • Attached Image
  • Attached Image

This post has been edited by amyceres: 25 February 2014 - 03:10 PM

Was This Post Helpful? 0
  • +
  • -

#12 amyceres   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 88
  • Joined: 11-October 12

Re: Cascading combo Boxes and Multi-Value Combo Box

Posted 25 February 2014 - 03:09 PM

View PostArtificialSoldier, on 19 February 2014 - 02:38 PM, said:

I think you would need to reset the boxes that it depends on, you might just want to reset all boxes. Maybe there's a button that you click to get to that screen, or an event you can use when the form is loaded, where you can add the code to clear all of the selections. You might just be able to set them to null to clear them.

Hello again..I still can't get the second multi-value combo box to filter only the choices associated with the first multi-value box.

Currently all work but the last cascading box. I attached pictures to see how it goes. When i checked two values in the cboProblemA box the next multi-value combo box does not populated with the choices associated with cboProblemA choices.

Help is appreciated.

Attached Image
Attached Image
Attached Image
Attached Image
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1