M
Morisatwork
Hi
I wonder is someone can help me re two aspects of the code below
Firstly I have a report that is based on a table (shopstats) and I am
using a form to pass the certain parameters.
strWhereCondition = "[ShopStats].[Survey] = '" & Me.cbSurvey & "'"
If cbShop "" Then
strWhereCondition = strWhereCondition & " AND [shopstats].[shop]
='" & Me.cbShop & "'"
End If
stDocName = "rptShopStats"
DoCmd.OpenReport stDocName, acPreview, , strWhereCondition
When the above code is run, and at the moment I am only passing the
Survey code ([shopstats].[survey]), a popup appears prompting for
shopstats.survey.
I have used the above in other forms/reports and they work.
What am i doing wrong? What should I be looking for?
My second query is that I want to create a summary report and want to
hide the following bands on the report. Is this the right code
'If Check12 = True Then
' rptshopstats.GroupHeader0.Visible = False
' rptshopstate.GroupFooter1.Visible = False
'End If
I wonder is someone can help me re two aspects of the code below
Firstly I have a report that is based on a table (shopstats) and I am
using a form to pass the certain parameters.
strWhereCondition = "[ShopStats].[Survey] = '" & Me.cbSurvey & "'"
If cbShop "" Then
strWhereCondition = strWhereCondition & " AND [shopstats].[shop]
='" & Me.cbShop & "'"
End If
stDocName = "rptShopStats"
DoCmd.OpenReport stDocName, acPreview, , strWhereCondition
When the above code is run, and at the moment I am only passing the
Survey code ([shopstats].[survey]), a popup appears prompting for
shopstats.survey.
I have used the above in other forms/reports and they work.
What am i doing wrong? What should I be looking for?
My second query is that I want to create a summary report and want to
hide the following bands on the report. Is this the right code
'If Check12 = True Then
' rptshopstats.GroupHeader0.Visible = False
' rptshopstate.GroupFooter1.Visible = False
'End If