Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Open Form linking multiple fields and set default values

Discussion in 'Information Technology' started by Martino165, Jul 28, 2006.

  1. Martino165

    Martino165
    Expand Collapse
    Guest

    I am trying to open a form filtered based on multiple fields to both
    view the records based on those fields and add new records with those
    default values set in the new record.

    e.g.,

    tblStudent frmStudent
    tblClasses subfrm Classes
    tbl Grades frmGradesViewandInput

    lkptblGradeTypes - quiz, test, project

    Single form for students with a subfrom of the student's classes in a
    continuous form (to show all of the students classes assocaited with
    that student)

    In the individual student-class record there will be an unbound
    combobox with lkptblGradeTypes as the options which on the "after
    update" will open form "tblGrades" and filter by that student's class
    and type of grades (selected value) and have focus on a new records
    with (for instance) math and quiz as the default values.

    thanks for any advice
     
  2. Loading...


  3. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    Martino,

    In your code that filters the records, you can also set the
    DefaultValue property of the class and type fields to the selected
    values.

    Jerry
     
  4. Martino165

    Martino165
    Expand Collapse
    Guest

    I attempted this the first time aroudn and had no luck. I have done it
    for other portions of my database and it works correctly.

    Can a use the link criteria to link multiple fields. My thought is
    that maybe having a multiple field primary key is causing the problem.


    One other thought: Is I am using an unbound combo box sorta like a
    command button. Basically the user selects the category and based on
    that category a specific form opens up with the associating key fields
    (eventually) set as default values for any new records.

    Hope this explains the details a little more
     
  5. Jerry Porter

    Jerry Porter
    Expand Collapse
    Guest

    So when you pick a student/class record, and select a Grade Type from
    the unbound combo box, you want to:
    - display frmGradesViewandInput
    - filter by the student/class and selected grade type
    - Use the student,class and selected grade type as defaults for new
    records
    - focus should be on a new record for data entry

    Right?

    Why dont' you post the code you're using in the AfterUpdate of the
    combo box.

    Jerry
     

Share This Page