sk1hotpepr
Technical User
I have a report that accepts one parameter with a stored procedure for it's record source. I have a frame with four values - "Past Clients", "Current Clients", "Prospective Clients" and "Show All Clients". The first three work fine but I can't seem to get Show All Clients to work with the report and I think it's because it's taking the value of the frame on the form rather than the NULL value I pass to the stored procedure. Is there a way to push the input parameter value into the report on open so I don't need to point it to the frame? Here's my VBA code:
Thanks!
Code:
If (Me.Frame26.Value = 4) Then 'rfp followup - default is show all
cmd.Parameters.Append cmd.CreateParameter("@prospect", adVarChar, adParamInput, 50, Null)
Else
strTmp = Me.Frame26.Value
cmd.Parameters.Append cmd.CreateParameter("@prospect", adVarChar, adParamInput, 50, strTmp)
End If
Set rst = cmd.Execute
DoCmd.OpenReport "rptProsType", acViewPreview
DoCmd.Close acForm, "SDClients"
rst.Close
Set rst = Nothing
Set cmd = Nothing
Thanks!