Open Form linking multiple fields and set default values

M

Martino165

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
 
J

Jerry Porter

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
 
M

Martino165

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
 
J

Jerry Porter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top