Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Unanswered: filtering records in a form

    Hi everyone,

    I did searches with no luck, so I'm hoping someone could help. I'm trying to create a maintenance database that holds tasks, scheduling, maintenance history, and can be used to add/update a work order. Before asking the question here's alittle of what I have.

    MAINTENANCE: task_id, pre(yes/no), mid(yes/no), post(yes/no).
    The reason why I chose yes/no boxes is because I wanted to make it easy for the user to add/remove a task to the pre, mid, or post experiment schedule. Also each of these tasks could be included in one or many of these schedules.

    WORK_ORDER_LINE: work_order_id, task_id, etc.

    WORK_ORDER: work_order_id, building, room, etc.

    I have a work order form which incorporates these tables. Originally I intended to create three separate forms so that pre, mid, and post work orders could be created this way I could set the task combo box to show only tasks which fall under the pre, mid, or post category. The problem is that when these work orders are viewed via a form... All the work orders are mixed in. What I'd like is for the form to show only pre, mid, or post work orders, but not all. Is there a way that I could filter the form by using an if else statement?

    Thanks for the help.

  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    first off, I would only use one field to determine pre/mid/post. You could use an integer field 1,2 or 3. Then filter your form based on that integer. If you want to view only pre, then you could include:

    WHERE sched_type = 1

    in your recordsource. Of course, you can do that now by quering your yes/no fields:

    WHERE pre = -1
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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