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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help creating a filter in a subform located on a tab control page 1

Status
Not open for further replies.

Johnnycat1

Programmer
May 4, 2005
71
US
I am trying to create a button to filter data on a subform located in a tab control.

The subform's query has a field with an expression where if certain check boxes are checked, the expression produces "1". If none of the check boxes are not checked, the expression produces a "0".

This is the code that I am trying to use to filter the subform based on the [RequiredInfo] 1 or 0.

Private Sub Command138_Click()

With Forms!FrmFixtureDetailing!FrmFixtureDetailingRequiredInfo.Form
.Filter = "[RequiredInfo]='" & 1 & "'"
.FilterOn = True
End With

End Sub

I am getting error 2001 "You cancelled the previous operation"

This error seems to be a red herring.

Any help???
 
Why not:

.Filter = "[RequiredInfo]=1"

?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top