Error 2100

S

Sylvain

Access 2000
I am dynamicaly placing controls on a report and hiding some controls
based on caculated
conditions. The code is being called from Detail_Format.
I have 17 information boxes where 6 can fit on one page in the
following format
1 2
3 4
5 6
7 8

The situation is that the number of controls can vary anywhere from 4
to 10 per report, and the controls that are not pertinent are hidden.

Here is some background pseudocode to explain
if condition1 then
control.top = y
control.left = x

if condition 2 then
control.visible = false

The problems I am having are these.
1) If the hidden controls top and left are off my physical page, then
I get extra blank pages with only header and footer details.


2) If I place all the controls in design time so that physically, they
fit on one page, and move them at run time, once I get to control 7,
which is on or close to a page break, I get run time error 2100.
"The control or subform is too large for this location."

Also, it seems that if I have all my controls are on one page, my
hidden control's seem to unhide themselves and that detail_format gets
called twice.

How do I force a new page so that control's 7 and up to print on the
second page of the report.

I can be more specific if this is ambiguous.

Thanks in Advance for any help.
 
A

Allen Browne

Use an Else with your conditions to ensure the hidden controls are placed at
0,0.

The Format event can be called multiple times if Access needs to do that. An
obvious example would be if you have the section's KeepTogether property
set, so Access finds it cannnot fit the section on the page, it will make a
page break and perform the formatting again for the new page.
 

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