S
scott
I want users to select a filter criteria on a form (Main Menu), hide the form
and open a report maximized. It worked well with slightly modified code and
in other forms that I have used, but I am at a loss on how to get it to work.
It opens the report fine, but then the form shows up on top with a
non-maximized report in a second window. The report filters correctly.
Dim stLinkCriteria As String
If (Forms![Main Menu]!AcctBreakout = 1) Then
DoCmd.RunCommand acCmdWindowHide
stLinkCriteria = "[All Data].Projsub= " & [Field5]
DoCmd.OpenReport "By Line Item2", acViewPreview
Reports![By Line Item2].Filter = stLinkCriteria
DoCmd.Maximize
End If
End Sub
and open a report maximized. It worked well with slightly modified code and
in other forms that I have used, but I am at a loss on how to get it to work.
It opens the report fine, but then the form shows up on top with a
non-maximized report in a second window. The report filters correctly.
Dim stLinkCriteria As String
If (Forms![Main Menu]!AcctBreakout = 1) Then
DoCmd.RunCommand acCmdWindowHide
stLinkCriteria = "[All Data].Projsub= " & [Field5]
DoCmd.OpenReport "By Line Item2", acViewPreview
Reports![By Line Item2].Filter = stLinkCriteria
DoCmd.Maximize
End If
End Sub