The fact that 24 people have viewed your thread before me, without offering any help, is due, I suspect, to the fact that no one has any idea what you're talking about!
You talk of 'problem with forms' then go on to speak of 'page counting code,' and then of 'how many reports(pages) i have in the form.'
Forms do not have reports, and do not have 'pages' in the context I suspect you're using.
You need to sit, take a breath, and try explaining your situation to us in a clearer fashion. Then I'm sure someone will be able to give you some advice.
Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007