Combo Form Filter

L

Lez

Hi Guys,

I have a combo and text box on a form, the text box holds the value of the
combo on the 'after update' event.

I want the form data to filter by the text box value but cannot get the
filter to work.

I have used the 'build wizard' to target the text box (txtrefereID) and get
this path info:

Forms![frmReferals]![txtReferalID]

However, this does not filter the form data, can anyone help me with this?

Many thanks
 
G

Golfinray

Use a combo to hold your selections that you want the user to choose from on
the form. In the afterupdate event code put:
Me.Filter = "yourfieldname = """ & Me.Combo & """"
M.Filteron = True.
Use the combo wizard to select the field name for you and then plug in the
number of your combo box. This filter will work on almost any form.
 
L

Lez

Many thanks for the reply, however, I do not understand your reply? I can
already populate the txtbox with the value I want, I just need to filter the
form data now by the value of that field.

This is were my problem is, not getting the combo value, filtering the form
data with this value

Any other suggestions, appreciated.


Golfinray said:
Use a combo to hold your selections that you want the user to choose from
on
the form. In the afterupdate event code put:
Me.Filter = "yourfieldname = """ & Me.Combo & """"
M.Filteron = True.
Use the combo wizard to select the field name for you and then plug in the
number of your combo box. This filter will work on almost any form.

Lez said:
Hi Guys,

I have a combo and text box on a form, the text box holds the value of
the
combo on the 'after update' event.

I want the form data to filter by the text box value but cannot get the
filter to work.

I have used the 'build wizard' to target the text box (txtrefereID) and
get
this path info:

Forms![frmReferals]![txtReferalID]

However, this does not filter the form data, can anyone help me with
this?

Many thanks
 

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