C
CSDunn
Hello,
I have a Form (frmRCMain) / Subform (frmRCSub) arrangement (MS Access 2003
ADP) in which the users clicks a combo box (Combo48) in the main form to
find a record in the subform. The bound column of the combo box is a field
called 'PERMNUM'. The main form's record source is SQL Server 2000 Stored
Procedure called 'RCMainForm_sp'. The subform's record source is a table
called 'tblRCStudentScores'. The linking child and master fields between the
two is also 'PERMNUM'. The PERMNUM field is basically a student ID, so when
the user selects a student name in the combo box, the matching student
record shows up in the subform.
If possible, I would like to set up the subform to use a Stored Procedure
for its record source. I want for the subform SP to take an @PERMNUM
parameter when the user makes a student name selection in Combo48, and show
the correct record.
The current SQL Server 2000 table being used as the record source for
'frmRCSub' has about 200 fields in it, all of which are needed as
textboxes/checkboxes in the subform. The table currently has about seven
thousand records in it, and PERMNUM is the Primary Key of the table. I'm
hoping that by using an SP for the record source of the subform instead of
the table, there will be a performance gain for the application and the SQL
Server database.
I have set up the following SP for the subform:
CREATE Procedure RCInputFormSub_sp
@Permnum varchar(12)
AS
SELECT * FROM tblRCStudentGrades
WHERE Permnum = @Permnum
I named 'RCInputFormSub_sp' as the record source for the subform 'frmRCSub',
and configured the Input Parameters of 'frmRCSub' as follows:
@Permnum varchar = forms!frmRCMain!Permnum
When the ADP opens, a form appears to the user called 'frmSwitchBoard'. The
user clicks a button labeled 'Report Card' to open 'frmRCMain'. During
testing, when I click the 'Report Card' button, a 'Parameter Value' box
opens before I see 'frmRCMain', which is not what I want to have happen. I
need for the form/subform to open, then have the parameter value 'sent' to
the SP recordsource of the subform after the user has made a selection from
Combo48 in the main form, and then show the record based on the selection
made in Combo48.
How can I do this?
Thanks for your help!
CSDunn
I have a Form (frmRCMain) / Subform (frmRCSub) arrangement (MS Access 2003
ADP) in which the users clicks a combo box (Combo48) in the main form to
find a record in the subform. The bound column of the combo box is a field
called 'PERMNUM'. The main form's record source is SQL Server 2000 Stored
Procedure called 'RCMainForm_sp'. The subform's record source is a table
called 'tblRCStudentScores'. The linking child and master fields between the
two is also 'PERMNUM'. The PERMNUM field is basically a student ID, so when
the user selects a student name in the combo box, the matching student
record shows up in the subform.
If possible, I would like to set up the subform to use a Stored Procedure
for its record source. I want for the subform SP to take an @PERMNUM
parameter when the user makes a student name selection in Combo48, and show
the correct record.
The current SQL Server 2000 table being used as the record source for
'frmRCSub' has about 200 fields in it, all of which are needed as
textboxes/checkboxes in the subform. The table currently has about seven
thousand records in it, and PERMNUM is the Primary Key of the table. I'm
hoping that by using an SP for the record source of the subform instead of
the table, there will be a performance gain for the application and the SQL
Server database.
I have set up the following SP for the subform:
CREATE Procedure RCInputFormSub_sp
@Permnum varchar(12)
AS
SELECT * FROM tblRCStudentGrades
WHERE Permnum = @Permnum
I named 'RCInputFormSub_sp' as the record source for the subform 'frmRCSub',
and configured the Input Parameters of 'frmRCSub' as follows:
@Permnum varchar = forms!frmRCMain!Permnum
When the ADP opens, a form appears to the user called 'frmSwitchBoard'. The
user clicks a button labeled 'Report Card' to open 'frmRCMain'. During
testing, when I click the 'Report Card' button, a 'Parameter Value' box
opens before I see 'frmRCMain', which is not what I want to have happen. I
need for the form/subform to open, then have the parameter value 'sent' to
the SP recordsource of the subform after the user has made a selection from
Combo48 in the main form, and then show the record based on the selection
made in Combo48.
How can I do this?
Thanks for your help!
CSDunn