Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form filter property (2003+)

    Silly one this, but in an effort to keep things (fairly) simple, I wanted to enter a criteria in the Filter property of a form & thereby restrict records.

    Trouble is, nothing I put in makes a difference.

    The relevant table, field & criteria are; tblLegis.HnSorE = "E "

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

    Re: Form filter property (2003+)

    You'd still have to activate the filter using the Filter button on the toolbar. It's not a dependable method though - if the user applies a filter manually, it may be saved in the Filter property when the form is closed, overwriting the filter you put there.

    You can use VBA code to apply a filter:
    <code>
    Me.Filter = "tblLegis.HnSorE = 'E '"
    Me.FilterOn = True
    </code>
    (Note the use of single quotes within the filter string; are you sure there should be a space after the E by the way?)

  3. #3
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form filter property (2003+)

    Ah. Hadn't realised that.

    Anyways, got that sorted now.

    Many thanks

Posting Permissions

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