Hi all,
I am new to using Access projects and I am trying to write a stored procedure that will act as the recordsource for a form.
The procedure is called GetRecordSource.
Here is the code:
Create Procedure GetRecordsource
(
@DECustID int
)
As
SELECT *
FROM Data_Cust
WHERE CustID = @DECustID
The recordsource on my form is GetRecordSource.
The InputParameters section is this
@DECustID = Forms!getcustid
GetCustID is a field that is populated by a search form. When the user selects a record, the OnCurrent event populates the main form with the CustID of the current record and then rqueries the main form using forms!data_entry!requery.
Is there something I am doing wrong? Why isn't this working? Any help is appreciated.
Chris
I am new to using Access projects and I am trying to write a stored procedure that will act as the recordsource for a form.
The procedure is called GetRecordSource.
Here is the code:
Create Procedure GetRecordsource
(
@DECustID int
)
As
SELECT *
FROM Data_Cust
WHERE CustID = @DECustID
The recordsource on my form is GetRecordSource.
The InputParameters section is this
@DECustID = Forms!getcustid
GetCustID is a field that is populated by a search form. When the user selects a record, the OnCurrent event populates the main form with the CustID of the current record and then rqueries the main form using forms!data_entry!requery.
Is there something I am doing wrong? Why isn't this working? Any help is appreciated.
Chris