Filter with double-click

J

jean

Hi

I have a continuous form containing 100 rows and 4 fields. One of the
field is named "EmpNo"

I want to be able to filter the form on a specific EmpNo when I
double-click it

I have try

Me.filter = Me.EmpNo
Me.filterOn = True

and it don't work

Can somebody help me ?

Thanks
 
J

John Spencer

Filters are strings. So try

Me.Filter = "EmpNo=" & Me.Empno

Or if EmpNo is not a number field

Me.Filter = "EmpNo=""" & Me.EmpNo & """"

I would name the control EmpNo to txtEmpNo to preclude confusion whether EmpNo
is referring to the control bound to the EmpNo field or to the EmpNo field itself.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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