Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

Open Form linking multiple fields and set default values

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

  1. Martino165

    Expand Collapse

    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.


    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


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

  4. Martino165

    Expand Collapse

    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

    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
    - focus should be on a new record for data entry


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

Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page