Multiple Parameters 
Author Message
 Multiple Parameters

I have a report that has 5 separate parameters that are passed to a stored
procedure.   Every example I find only shows how to pass multiple values to
a single parameter.  I used the example for 1 but noticed that it still
prompts for all 5.  How do I pass 5 different parameters or even just 2 and
prevent it from prompting the user each time?


Wed, 29 Sep 2004 21:38:18 GMT  
 Multiple Parameters
I would iterate in ParameterFields to make sure they are all set. Are you
sure you are passing 5 parameters to a single SP or are you trying to use
several SPs at the same time ?

For example :

    For Each prm In Report.ParameterFields
        prm.ClearCurrentValueAndRange
        Select Case prm.Name

                prm.AddCurrentValue CLng(Prosit.Projet_pk)

                prm.AddCurrentValue CLng(LotPK)

                prm.AddCurrentValue CStr(Format$(Prosit.Mois, "yyyymmdd"))

                If TypeOf Report Is crF Or TypeOf Report Is crF1 Then
                    prm.AddCurrentValue 1
                Else
                    prm.AddCurrentValue 0
                End If
            Case Else
                MsgBox "Paramtre d'tat " & prm.Name & " non gr.",
vbExclamation
        End Select
    Next

will feed parameters from the VB app and will issue a message box if a
parameter name is not handled properly...

Patrice



Quote:
> I have a report that has 5 separate parameters that are passed to a stored
> procedure.   Every example I find only shows how to pass multiple values
to
> a single parameter.  I used the example for 1 but noticed that it still
> prompts for all 5.  How do I pass 5 different parameters or even just 2
and
> prevent it from prompting the user each time?



Fri, 01 Oct 2004 21:21:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Sub with multiple parameters

2. Passing multiple parameters to Access query using Form List Box

3. How to pass multiple parameters to a custom property

4. Excel VBA - How to return multiple parameters/variables via a sub

5. Data Grid DataNavigateUrlFormatString multiple parameters

6. How to pass multiple parameters with QueueUserWorkItem call?

7. returning multiple parameters to vbscript

8. Providing multiple parameters to Access queries

9. ADO and Access Multiple Parameter Queries

10. VB6 - Problem passing multiple parameters to Command SQL statement

11. Multiple Parameter Problem

12. receive multiple parameters from a method?

 

 
Powered by phpBB® Forum Software