Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Location
    Greece
    Posts
    20

    Unanswered: update the filter value

    Good morning every one.

    I have a form that lists records and i have the capability to apply a filter there. I also have a button that links to a report where i can get the selected records (by the filter) print. In the apply filtert event of the form i have the following code:

    Me.Filter = Empty
    ifiltertype = ApplyType

    I also have a module with the following code:

    DoCmd.SelectObject acForm, "frm_hdw_rlist", True
    DoCmd.Minimize
    Dim ifiltertype As Integer
    ifiltertype = ""

    The filter works fine with the report. The only problem that i have is that when i close the form and open it again the filter value holds its last value and so in the report i get the last filtered values even if i have not choosen a new filter. If a choose a new filter then the value changes.

    What i need help is how to clean the value of the filter every time the form or the report closes.

    Many thanks.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    insert some code in the forms "onload" or "onclose" events
    eg
    me.filteron=false
    me.filter=""

  3. #3
    Join Date
    Sep 2004
    Location
    Greece
    Posts
    20
    thanks for the reply but it doesen´t work, more over when i add that code no filter exist any more.

  4. #4
    Join Date
    Sep 2004
    Location
    Greece
    Posts
    20
    Sorry my friend I was wrong before. It works! I post a sample file were it works. Thank you very much for your help.

    Greetings from Greece.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •