John Baker
Registered User.
- Local time
- Today, 04:24
- Joined
- Apr 13, 2005
- Messages
- 35
I am trying to make a call to an action query (qry_prod_prob_build) in the Group Header of a report that builds/creates a table that is used to graph a chart in the Group Footer section of the report. The action query works fine if I hard code the product name into the parameters collection (see subroutine below). However, what I really need to do is pass the product name into the subroutine call but I cannot figure out the correct syntax.
Am I on the right track with this approach? Can anyone lend a helping hand?
Thanks,
John
Private Sub ProductTypeHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim qdf As QueryDef
Set qdf = CurrentDb.QueryDefs("qry_prod_prob_build")
With qdf
.Parameters("PRODUCT_TYPE") = "PRODUCT NAME"
.Execute
End With
Set qdf = Nothing
End Sub
Am I on the right track with this approach? Can anyone lend a helping hand?
Thanks,
John
Private Sub ProductTypeHeader_Format(Cancel As Integer, FormatCount As Integer)
Dim qdf As QueryDef
Set qdf = CurrentDb.QueryDefs("qry_prod_prob_build")
With qdf
.Parameters("PRODUCT_TYPE") = "PRODUCT NAME"
.Execute
End With
Set qdf = Nothing
End Sub