Close a report in preview mode with VBA
anonymous_at_discussions.microsoft.com
Date: 09/29/04
- Next message: Little pete: "Re: Display on report..."
- Previous message: Snurre: "Close a report in preview mode with VBA"
- In reply to: Snurre: "Close a report in preview mode with VBA"
- Next in thread: Allen Browne: "Re: Close a report in preview mode with VBA"
- Reply: Allen Browne: "Re: Close a report in preview mode with VBA"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 29 Sep 2004 02:02:38 -0700
Figured it out:
If Forms!bhr!StatusId = 5 Then
stDocname = "rBrevVentelisteEnkel"
With DoCmd
.OpenReport stDocname, acPreview
.RunCommand acCmdPrint
.Close acReport, "rBrevVentelisteEnkel"
End With
End If
>-----Original Message-----
>Hi ..
>
>I have a code allowing users to choose printer for
>printing a report. To do this, the report must be opened
>in preview mode..But how do I close the report, it locks
a
>table when it's open, preventing other users to open a
>report.
>
>Dim stDocname As String
>
>If Forms!bhr!StatusId = 5 Then
> stDocname = "rBrevVentelisteEnkel"
> With DoCmd
> .OpenReport stDocname, acPreview
> .RunCommand acCmdPrint
> End With
>End If
>
>Snurre
>.
>
- Next message: Little pete: "Re: Display on report..."
- Previous message: Snurre: "Close a report in preview mode with VBA"
- In reply to: Snurre: "Close a report in preview mode with VBA"
- Next in thread: Allen Browne: "Re: Close a report in preview mode with VBA"
- Reply: Allen Browne: "Re: Close a report in preview mode with VBA"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|