Multiple print - VBA

G

Guest

Quite simple bit of code to print multiple copies of ReportName but I am
baffled by this one and am obviously doing something really stupid. The code
works - but after running (and printing – multiple copies as set by
[CardCount] combo) it minimises (not close but minimise) the main form (in
fact all forms). V Strange. I don't really want to add anything daft like a
Maximise until I know where I'm going wrong.

Private Sub PrintCount_AfterUpdate()
DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut , , , , Me![PrintCount]
Exit Sub
Me.PrintCount.Visible = False
End Sub


Any ideas would be gratefully appreciated
 
G

Guest

Managed to get it sorted (sort of) but the form still minimise for a split
second - but the DoCmd.SelectObject acForm and the SetFocus stuff puts it all
back in place. Still V Strange.

Private Sub CardCount_AfterUpdate()
DoCmd.SelectObject acReport, "ReportName", True
DoCmd.PrintOut , , , , Me![CardCount]
DoCmd.SelectObject acForm, "MainForm", False
Me.SubForm.SetFocus
End Sub

Anyone have any ideas as to why this would happen

Cheers and thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top