Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filter By Form (2000)

    Is it possible then when you do a filter by form and it does not return any result that it can display a msgbox No Records were found and then reverts back to the unfiltered version of the form?
    Best Regards,

    Luke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    You could write code for the On Apply Filter event of the form, and check whether the filter returns any records:

    Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
    If ApplyType = acApplyFilter Then
    If DCount("*", "Table_or_Query", Me.Filter) = 0 Then
    MsgBox "No records were found!", vbExclamation
    Me.Filter = ""
    End If
    End If
    End Sub

    You must replace Table_or_Query with the name of the table or query that acts as record source of the form.

  3. #3
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    thanks hans.

    The db went well today, a few teething problems.,

    I did notice that even on a gigabit network there is still a good few seconds delay? Expected?
    Best Regards,

    Luke

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    When do you experience the delay? When opening the database, or when opening a form? And is the delay noticeably shorter the second time within a session, or not?

  5. #5
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    Why is it that if you scroll using the frecord selectors to the right it will just keep adding new records, it won't say there is nothing beyond this point?
    Best Regards,

    Luke

  6. #6
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    Get approx 30seconds delay opening the database, sometimes can extend for a minute approx. Switching between forms is not as responsive before I split the db and put it on the network
    Best Regards,

    Luke

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    That's not normal behavior. Do you have code that automatically populates one or more fields - that could cause the behaviour you describe.

  8. #8
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    that will explain it then.

    I have also read that I should exclude the virus scanner from scannig the directory?
    Best Regards,

    Luke

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    That is *very* slow! See if the tips in the thread starting at <post:=356,901>post 356,901</post:> help.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    Network folders should only be scanned by a virus scanner installed on the server, not by virus scanners on the local workstations.

  11. #11
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    going back to the original topic.

    If we have a the same form however, if we filter for the form and make ammendments to the form parent not a tabbed control and try to clikc on the filter by form button again it does not do anything.

    However if we go into the property filter by form and don't change any of the details we can go into filter by form again

    Any ideas?
    Best Regards,

    Luke

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    What is "the property filter by form"?

  13. #13
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    When you say 'property' what do you mean?

    The button is a toolbar button, not on the form.
    Best Regards,

    Luke

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter By Form (2000)

    Perhaps you need to set focus to the appropriate subform or form in the command button on the form.

  15. #15
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filter By Form (2000)

    So I have a command button in the header of the from now, the form is called frmProperty. The code for the button is: -

    acCmdFilterByForm

    How would I get the focus to be set on the form
    Best Regards,

    Luke

Page 1 of 2 12 LastLast

Posting Permissions

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