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

Cmd Bttn for filtering a form by column '> 0'

Status
Not open for further replies.

deadhead7

Programmer
Apr 18, 2003
57
US
I need to filter a form by a command button that will only show column of currency [ALLW]'> 0'
It is on ONCLICK.
How do I get this to Filter the form to only show values greater than 0
 
Me.FormName.Filter = "[ALLW]>0"
Me.FormName.FilterOn

HTH
Mike

[noevil]
 
Im sorry but that did not work, do you have any other suggestion
 
Did you requery the form after turning the filter on?

Me.Formname.Requery

HTH
Mike

[noevil]
 
Well I tried that and I am still getting the error "Invalid Qualifier"

Any other suggestion here is what I have on the ON CLICK button

Me.FormName.Filter = "[ALLW]>0"
Me.FormName.FilterOn
Me.FormName.Requery

 
Hi!

If this is a subform you are filtering from the main form, try:

[tt]Me!FormName.Form.Filter = "[ALLW]>0"
Me!FormName.Form.FilterOn = True
Me!FormName.Form.Requery[/tt]

- note - the FormName referst to the subform control name, which might differ from the subform name as viewed in the database window.
- ALLW is a field in the underlying recordset, not a control on the form

If this is filtering the current form, try:

[tt]Me.Filter = "[ALLW]>0"
Me.FilterOn = True
Me.Requery[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top