Public variables and input parameters

L

Leif S

Hi

In a form i use a stored procedure as data source. The procedure takes two
input parameters. I want to use the value of two public variables that I have
defined in the application as input parameter and specify this in the Input
Parameter property of the form. Can this be done in Access? If yes: how? If
no: What is the alternative?

Thanks for any assistance!

/Leif S.
 
A

Allen Browne

Public variables are accessible only in code.
You can expose them with a function.

Example:
Public gstrReportFilter As String
Public Function ShowReportFilter As String
ShowReportFilter = gstrReportFilter
End Function

You can now use ShowReportFilter() in the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top