Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option group selection to update combo box

Status
Not open for further replies.

perrymans

IS-IT--Management
Nov 27, 2001
1,340
US
I have a combo box which lists only active jobs as set in the query cboProjects. I wanted to be able to hot swap between viewing active and inactive or all on the same form. I created another query, cboProjectsAll which displays all jobs.

On the form, I added an option group with two toggle buttons, Active and All. I tried to use the forms OnCurrent to change Combo12's RowSource based on the option group selection as follows:

Private Sub Form_Current()

If Me.Frame19 = 2 Then
Me.Combo12.RowSource = "cboProjectAll"
ElseIf Me.Frame19 = 1 Then
Me.Combo12.RowSource = "cboProject"
End If

End Sub

But the records in the combo never update. I thought it would always update if I used OnCurrent. ShouldI be Refresh or Requery (ing) this form after the If statement?

Thanks. Sean.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top