Options Group to filter Query

A

Anne

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
 
O

Ofer Cohen

Call the Sub on the OnCurrent event of the form

Call Frame24_AfterUpdate()

it should run this sub after the form is loaded
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top