change query or filter from inside a form?

  • Thread starter Thread starter rexHowell
  • Start date Start date
R

rexHowell

Hello,

love the site ... Mr. Goldgar has already helped me with one problem I
was having ...


now my next thing to tackle is figuring out how to change a filter or
query from inside of a form. I have a field in my form called
OrderStatus which holds the values OPEN, DISPATCHED, CANCELED, CLOSED
or HOLD ...

I want to have buttons in my form that change the querry
<OrderStaus> criteria. ie <Button1><On CLick> <OrderStaus> criteria =
"OPEN"
and then me.refresh the form to represent the changes.

I have been reading other posts ... but can't seem to find one that
helps me ... if anyone knows of a post explaining this process, I'd
love to read it ... thank you.



Rex
 
you can do in couple of ways.
try this
DoCmd.openForm "frmName", acNormal, , "OrderStatus='" &
strStatus & "'"

or

Me.FilterOn
Me.Filter = "OrderStatus='" & strStatus & "'"


HTH
vb
 
Back
Top