Okay I have progressed further but still SOMEBODY'S HELP.
I pinpointed the problem to this bit of code: It works with my admin
account because I permissions to change objects and make save
changes. But this bit of code is not saving the changes when the code
if fired when logged in by my users. Even though I have given that
group of users all admin permissions on the queries and report. How
can I get around the fact that since it is a multiuser database, it
won't allow any report design changes? This is the only thing I can
come up with.
This code is on my OnClick Event of my search form.
If Me.AREACHECK = True Then
DoCmd.Echo False
DoCmd.OpenReport
"rptProductUseSummaryPestGlobal", acViewDesign
Set obReport =
Reports(rptProductUseSummaryPestGlobal)
With obReport
.Visible = False
' code to change report properties
Reports!
rptProductUseSummaryPestGlobal.AreaHeader.RepeatSection = True
Reports!
rptProductUseSummaryPestGlobal.WSDAHeader.RepeatSection = False
Reports!
rptProductUseSummaryPestGlobal.LOTHEADER.RepeatSection = False
End With
DoCmd.Close acReport,
"rptProductUseSummaryPestGlobal", acSaveYes
ElseIf Me.WSDACHECK = True Then
DoCmd.Echo False
DoCmd.OpenReport
"rptProductUseSummaryPestGlobal", acViewDesign
Set obReport =
Reports(rptProductUseSummaryPestGlobal)
With obReport
.Visible = False
' code to change report properties
Reports!
rptProductUseSummaryPestGlobal.WSDAHeader.RepeatSection = True
Reports!
rptProductUseSummaryPestGlobal.AreaHeader.RepeatSection = False
Reports!
rptProductUseSummaryPestGlobal.LOTHEADER.RepeatSection = False
End With
DoCmd.Close acReport,
"rptProductUseSummaryPestGlobal", acSaveYes
ElseIf Me.LOTCHECK = True Then
DoCmd.Echo False
DoCmd.OpenReport
"rptProductUseSummaryPestGlobal", acViewDesign, , acHidden
Set obReport =
Reports(rptProductUseSummaryPestGlobal)
With obReport
.Visible = False
' code to change report properties
Reports!
rptProductUseSummaryPestGlobal.LOTHEADER.RepeatSection = True
Reports!
rptProductUseSummaryPestGlobal.AreaHeader.RepeatSection = False
Reports!
rptProductUseSummaryPestGlobal.WSDAHeader.RepeatSection = False
End With
DoCmd.Close acReport,
"rptProductUseSummaryPestGlobal", acSaveYes
End If
DoCmd.Echo True
DoCmd.OpenReport [Forms]![frmMaterialAppsSearch]!
[txtReportName], acViewPreview
End If
|