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

Need Help with cmd btn and form filtering.

Status
Not open for further replies.
Jan 20, 2005
4
CA
Hi there,

I have a form with an unbound combo box that filters the list of products to the client selected.

On the side I would like a command button that takes the value of the unbound box and views the products as a category view.

Now, I already have a category view form that is linked to that command button, but need it to be filtered to the selected client.

Can anyone help here?

Much appreciated.

AJ
 
Make sure you bound the combo box to the value you are filtering by and then On your AfterUpdate event use

Filter="<field to filter> =" & UnboundComboBox
FilterOn=True


You might want some code that clears the filter if the comboBox After Update is null.


-Laughter works miracles.
 
What code can I use to tell the command btn to retreive a value from a form or a combo box, before opening the category form.

Becuase then I can hvea macro use that value with a query.....or can I ?
 
You can save it using VBA code.


In the afterUpdate Event you might use something like.


Dim tmpCategory as string


tmpCategory=unboundComboBox.value
'Open your form code goes here

'Fill the comboBox with whatever the previous value was
UnboundComboBox=tmpCategory


If this doesn't work you might have to post the code here.

-Laughter works miracles.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top