Results 1 to 2 of 2
  1. #1
    mrbabji is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    12

    Thumbs up Subform data based on input from the main form

    Hi Every body

    I have a subform where I need to display the records from a table based on the input from the main form.

    For example, I have a table with studeninfo viz., studentno and marks in diff subjects.

    On the main form I maintain a text box for input and a command button.
    1. If I give "ALL" in that text box and click command button. All Students records pertaining to all subjects should be dispalyed in the subform.


    1. If I give a particular subject name in the text box(for ex. Maths) and click command button. That particular subject records for all students should be displayed.

    This should be done assigning query to a string method in the VBA code.

    Can any body help me please resolving this.

  2. #2
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    This is what I understand from your Thread;
    1) You have a Main and a subform
    2) You want to Filter the Main Form based on a criteria in the sur Form.

    I had done some thing similar and here is the mdb file attached. You will see that Policy Number is actuall recorded in the sub_Form. i have a combo box where i select the policy Number and the main from is filtered.

    see the example. Mark the thead solved if this example helps you to solve your problem.

    let me know if you have any problems.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-17-2010, 05:32 PM
  2. Replies: 2
    Last Post: 03-31-2010, 01:56 PM
  3. Rookie Messed Up Main Input Form
    By genest11 in forum Forms
    Replies: 2
    Last Post: 01-14-2010, 02:17 PM
  4. Replies: 0
    Last Post: 06-23-2009, 03:01 PM
  5. Replies: 6
    Last Post: 06-03-2009, 02:01 PM

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