Help for subform values as paramenter from report to sql procedure

aadebayo

Registered User.
Local time
Today, 05:03
Joined
May 10, 2004
Messages
43
Hello

Please I will appreciate some help with ACCESS 2007 and SQL Server. I am currently migrating an Access 2000 application to Access 2007 adp. I need to send 2 parameters from a report to a stored procedure. The values of these 2 parameters are derived from a sub form. I have defined the sql proceure as the record source for the report, but I do not know how to define the paramenters from the input parameter field. What I currently have is

@SchoolName varchar(50) = [forms]![frmFSM]![sbfPupil]![school_ID.column(1)]

but it does not work, it still prompts me to enter parameters.

frmFSM is the main form
sbfPupil is the sub form
 
When working with an object on a form which you have to refer to the column number the number goes after the field name, like this

me.cboCompany.Column(1)

So I think your

[school_ID.column(1)]

should be [school_ID].Column(1)
 

Users who are viewing this thread

Back
Top Bottom