Record Source Input Parameters

S

scott

I have 2 input parameters in an ADP form based on a sproc (See LISTING 2).
On the ON CHANGE event on a combo drop down called "cboFilter1", I have the
code in LISTING 1 that changes the form's record source when the user
changes the combo drop down "cboFilter1".

As you can see in LISTING 1, the sproc's input parameters are hard-coded.
How can I re-write LISTING 1 to use the input parameters var1 and var2? I'm
a bit confused over how to construct the exec line so the sproc and the
input parameters are properly encased with the double and single quotes.

Any help is appreciated.


LISTING 1:

Dim strRecordSource As String
strRecordSource = "Exec [mySproc] '1','4'"
Me.RecordSource = strRecordSource

LISTING 2:
@var1=[Form]![cboFilter1], @var2=[Form]![cboFilter2]
 

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