Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2010
    Posts
    7

    Filter a Continuous Form

    Hi,

    I'm new to access and have been trying to find a way to filter a continuous form using a combo box.

    The database only as one table called Students, and the field that I use for the combo box is called TTS_Class.

    What I want is when I open the continue form (called Student_attendance) that I use the drop down to display only those students that are in the selected class.

    I have tried different methodes and just cant figure it out.



    Any help would be greatly appreciated!

    Thank you

  2. #2
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    There are several different ways you can approach this. The method I would use is the following:

    In the "Record Source" for the form invoke the SQL statement and bring all of the fields from your table (Students) into the SQL builder. Right-click in "Criteria" under the field by which you want to filter and click "Build". When the expression builder pops up drill down to your combo box by selecting your form from "Forms" and then find your combo box, click it, and then double-click "<Value>". Click "OK". Close and Save the SQL builder. Then select your combo box and invoke the "Code Builder" for the "On Click" Event. Type formname.requery. Save your form. This should work.

  3. #3
    Join Date
    Aug 2010
    Posts
    7

    Questions in regards to responce

    Hi,

    As I said before I'm new to access so have a few questions on how to perform what you wrote! (Sorry)

    I went to the Record Source and outside from choosing my table/Query all I was able to find was to create a new query, it it once in there I go to the SQL view?
    Now I was not able to find the Criteria, ?

    Thanks

  4. #4
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    No big deal. Ok, so you chose your table, which was Students. You drag all of your fields from Students down below where you see all of the...for lack of a better term columns. So you should see each of your fields from Students in the columns. There are six rows you should see. The first row "Field:" will have your field name, the second row "Table:" should have Students shown. Go down to the 5th row which should say "Criteria:". Now go over to the field you want to filter on and right-click in the "Criteria" rown under your field's column. This will give you a couple options one of which is "Build...". Once there you will see a list below a text box. Double-click on "Forms", double-click on "Student_attendance", and double-click on "TTS_Class". Click "OK" and then click "Close". When asked to save click "Yes".

  5. #5
    Join Date
    Aug 2010
    Posts
    7

    Another question

    Just done that and now getting Run-Time Error 2465

    Microsoft office access can't find the field '|' refered to in your expression.

    One part I was not sure was about the criteria, first repsonse was to select my combo box, but the second was to select tts_class (the field).

    I have tried both to be sue but still getting the above message.

    Thank you again.

  6. #6
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Example

    I have attached an example database. Take a look at what I've done and see if that helps. Let me know if you have any questions.

  7. #7
    Join Date
    Aug 2010
    Posts
    7

    Thank you

    Thank you for your help it worked perfect now!

  8. #8
    arphrodite is offline Novice
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    1
    Does this work on form based on Query?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-22-2010, 05:55 AM
  2. programming a continuous form?
    By Ferret in forum Programming
    Replies: 3
    Last Post: 05-30-2010, 04:51 PM
  3. jpg file in continuous form
    By ngocham2001 in forum Forms
    Replies: 3
    Last Post: 04-18-2010, 03:34 AM
  4. Continuous Form
    By duckie10 in forum Access
    Replies: 13
    Last Post: 06-09-2009, 11:15 AM
  5. Continuous Subforms Filter Dependant Combo
    By BigBear in forum Forms
    Replies: 0
    Last Post: 04-19-2009, 08:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums