HELP: Creating document from Access

Z

zGhost

I've been working of this for days... I'm quick new at this so bare wit
me...

I'm trying to re-work someone else's code where it reads an Acces
database and creates a report. The problem is that if there are mor
than 10 samples in the recordset that it's reading. There needs to be
page break in the Word document.

I can get the page break to work by simply using:
If Count = 10 Then
'Page break in report
WApp.Selection.InsertBreak Type:=wdPageBreak
Count = 0
End If
However this stops the reading of the recordset after reading the 11t
sample.

I'm totally confused! Oh this is Word 2000 and the VBA is in Acces
200
 
D

Doug Robbins - Word MVP

Use

If Count Mod 10 = 0 then

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
W

Word Heretic

G'day zGhost <[email protected]>,

need to see the code around this proc - it doesn't suggest anything by
itself.



Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


zGhost reckoned:
 
D

Doug Robbins - Word MVP

And delete the Count = 0

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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