Data refresh

W

Warrio

Hello!

After that I have changed the filter of a form, how I get immediately after
the new data displayed?
(The textboxs are all linked to the same record source as the form.)
I have tried :
myForm.Refresh
myForm.Recalc
myForm.Requery

none of these works..

Thanks
 
A

Allen Browne

The data should display automatically once the filter is set.

Requery loads all records: really only necessary if you (or other users)
have altered the data elsewhere.

Refresh is less dramatic, but still should not be needed.

Recalc causes Access to figure out the values for the calculated controls
again. Calculated controls are those that have an expression in their
Control Source (i.e. the Contorl Source starts with an equals sign).

None of these are needed to display the results of a filter. If you have set
the form's filter like this:
Me.Filter = xxxx
then don't forget to do this as well:
Me.FilterOn = True
 
W

Warrio

Thanks a lot!!
I thought that setting the propriety Allowfilter to True was enough!

great job!
 

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