Options Group to filter Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I had problems getting this going but it seems to be working now, here is my
code

Private Sub Frame24_AfterUpdate()
Select Case Frame24
Case 1
Me.RecordSource = "Select * from cboCustomersQB where [customerno] is null "
Me.Requery
Case 2
Me.RecordSource = "Select * from cboCustomersQB"
End Select
End Sub

It works, however, although case 1 is the default and is checked when the
form opens, all jobs show upon opening. I have to click the case 2 button to
then the case 1 button and then it works.
I tried to on load event and on open event of the form with
Me.RequeryPrivate Sub Form_Load()
Me.Frame24.Requery
End Sub

Can't get it to open showing case 1
Anne
 
Call the Sub on the OnCurrent event of the form

Call Frame24_AfterUpdate()

it should run this sub after the form is loaded
 
Back
Top