filer by form: help please

  • Thread starter Chetan I. Rathi
  • Start date
C

Chetan I. Rathi

Hi,

I have this filter form thing. I have a few questions on it

1. is there any command for filter-by-form, like Docmd.runcommand
accmdfilter sort? or this is command is same for filter-by-form as well? not
sure on this

2. and if my filter by form results no data from the databse, than how can I
have user friendly meesage.

I will be thankful if some one can help me on this

Thanking in advance
Rathi
 
A

Allen Browne

You can enter Filter By Form mode with:
RunCommand acCmdFilterByForm
However, you cannot use a command button on the form to return to normal
view, since the buttons (and all code) are disabled in FBF. It might
therefore be better to teach the user to use the toolbar instead.

After applying a filter, you can test if the form has any records with:
Me.Recordset.RecordCount

FBF has some limitations. It is not very user-friendly, and doesn't work in
the runtime/mde. If you are interested in programming an alternative, see:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
 
Top