[dba-SQLServer]Parameters when opening forms

David Emerson davide at dalyn.co.nz
Thu Feb 20 21:14:29 CST 2003


AXP ADP/SQL2K

I have a form (Form2) that can be opened from two separate places in my 
FE.  The first (Form1) requires only a specific customer's records to be 
viewed in Form2.  The second (Form3) requires all customers records to be 
viewed in Form2.

The source is a stored procedure which used a parameter to select the 
specific customers records.  Form1 has the customer showing and when it 
opens Form2 it sends the CustomerID as an OpenArg to Form2 (eg "@CustIDNo 
int=992168150").  Form2 then places the OpenArg into its InputParameters 
property which is used by the stored procedure to only show the current 
customers records.  Fine.

The problem is with Form3.  This is to open Form2 but show all customer 
records.  I am having problems telling the sproc parameter that it should 
include all records.

Am I tackling the problem the right way or is there a simpler way to do it 
(for example in mdb's just including or leaving off the WherCondition 
criteria in DoCmd.OpenForm).

Regards

David Emerson
DALYN Software Ltd
25b Cunliffe St, Johnsonville
Wellington, New Zealand
Ph/Fax (877) 456-1205 




More information about the dba-SQLServer mailing list