Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Setting the Filter Property on a Form (Access 2k)

    Dear All

    I've got a form that displays data from a child table. I want the users to see a list of the records in this table, but not where a specific field is filled in. Can I do this with the form's Filter property, or do I need to use a query to collect the data for the form? I had hoped to keep it simple as the form will allow the data to be edited.

    I've had to rule out using a combo box as the two references the user is likely to have to hand can have duplicates in this table. This results in the combo box presenting the first such record (after all it is rs.FindFirst [img]/forums/images/smilies/smile.gif[/img] ). I gave some serious thought to using an array or collection, but as I started to read up on these it soon became apparent they are beyond my VBA savvy.

    I'm guessing the Filter property is the right solution, but cutting and pasting SQL hasn't worked, and none of the other attempts at copying functioning filters has been successful.

    What's the 'trick' to this??

    Thanks

    Ian

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Setting the Filter Property on a Form (Access 2k)

    Are you using a subform to display the child data? I presume by child data, you mean a table with a many to one link to the primary table?
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Oct 2001
    Location
    Newport, Gwent, Wales
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Setting the Filter Property on a Form (Access 2k)

    Wendell

    I'm not using a sub form, it's a stand alone form to display all the records in the child table. The child table is the many side of the relationship, yes.

    Thanks

    Ian

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

    Re: Setting the Filter Property on a Form (Access 2k)

    If you always want the form to display records for which a specific field has not been filled in, it is better to change the query that acts as record source than the filter - a stored query is more efficient. Just add Is Null in the Criteria: line for the specific field.

    Post back if that is not what you intended (I am not sure what you actually want)

Posting Permissions

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