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

Docmd.ApplyFilter doesn't work

Status
Not open for further replies.

Bresart

Programmer
Feb 14, 2007
314
ES
Hi, i need to filter a form for leaving one only record. I have done it until now with:

Docmd.ApplyFilter "", "[Fieldname]='" & value & "'"

But it has stopped working, i don't know why but suppose due to any modification done in the code.

I have tried doing this opening a recordset (with a SQL statement) with only the wanted record and after with

Set Me.Recordset=rrdset

but it gives another different problems, so i think the most suitable way of doing it would be with Docmd.ApplyFilter.

Thanks for looking.

 
Have you tried
[tt]Me.Filter = "[Fieldname]="" & value & """
Me.FilterOn=True[/tt]

Changing the recordset is a very useful way of getting just one record. What problems was it causing?
 
Thanks, i have done it setting the RecordSource prop. of the form to a query that selects the wanted record, because Me.Filter neither worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top