form filter help

L

Lez

Hi Guys,

Can anyone tell me why this will not work?

[Forms]![frmReferals]![txtReferalID]

I have a form that I want filter by the value of txtReferalID for some
reason this does not pick it up?

Any suggestions
 
G

Golfinray

It is easier to just use a combo box. Use the wizard to set the recordsource
of the combo to txtreferalid. Then go into the properties of the combo, find
events, go to afterupdate and click on code builder. Type:
Me.filter = "[txtreferalid] = """ & Me.yourcomboandcombo# & """"
Me.filteron = true
 
L

Lez

Hi,

Thanks for that, however, I do not understand your method?

The txtreferalID will not have a value until a choice is made from the combo
box?




Golfinray said:
It is easier to just use a combo box. Use the wizard to set the
recordsource
of the combo to txtreferalid. Then go into the properties of the combo,
find
events, go to afterupdate and click on code builder. Type:
Me.filter = "[txtreferalid] = """ & Me.yourcomboandcombo# & """"
Me.filteron = true

Lez said:
Hi Guys,

Can anyone tell me why this will not work?

[Forms]![frmReferals]![txtReferalID]

I have a form that I want filter by the value of txtReferalID for some
reason this does not pick it up?

Any suggestions
 

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