R
Ronald_2001 via AccessMonster.com
Hi,
In my ADP Database I store info of a few product_groups.
Each group has its own Access Form, but they all uses the same tables
(Main_table, look_up tables).
To restrict the recordsets (control sources for combo boxes) for a certain
product group, I use stored_procedures with one parameter: @prod_ID
Each Form has an invisible textbox wih an fixed value (=1, =2 or =3).
My intention is to pass this value to the parameter of the stored procedures
when the Form opens.
To do this I put this code into the OnOpen event of the Form:
Private Sub Form_Open(Cancel As Integer)
Me.InputParameters = "@prod_ID=" & "Me.[prod_ID]"
End Sub
But instead of displaying certain records and restricted controlsources for
the combo boxes,
a 'Enter Parameter' dialog window appears.
After entering a value the Form works like it should.
Do I have to put the code in an other event or is the code incorrect ?
Please help.
Ronald
In my ADP Database I store info of a few product_groups.
Each group has its own Access Form, but they all uses the same tables
(Main_table, look_up tables).
To restrict the recordsets (control sources for combo boxes) for a certain
product group, I use stored_procedures with one parameter: @prod_ID
Each Form has an invisible textbox wih an fixed value (=1, =2 or =3).
My intention is to pass this value to the parameter of the stored procedures
when the Form opens.
To do this I put this code into the OnOpen event of the Form:
Private Sub Form_Open(Cancel As Integer)
Me.InputParameters = "@prod_ID=" & "Me.[prod_ID]"
End Sub
But instead of displaying certain records and restricted controlsources for
the combo boxes,
a 'Enter Parameter' dialog window appears.
After entering a value the Form works like it should.
Do I have to put the code in an other event or is the code incorrect ?
Please help.
Ronald