Control source on continuous form

P

Paradigm

I have a continuous form with 55 fields being displayed in columns. This is
from a table with 220 fields. I need to change the control source from
actual values to percentage values. So instead of the controlsource being
week1 I want to change it to percent1 and week2 to percent2, (there is no
way of calculating one from the other so there is no redundant data) etc.
I run a function

For i = 1 To 53
myform("week" & CStr(i)).ControlSource = "percent" & CStr(i)
Next i

This seems to work fine if the continuous form has about 50 rows or less but
when there are more rows I get an error: -

runtime error 2101
The setting you entered isn't valid for this property.

It obviously is valid since it works with fewer rows.

I have tried this by adding rows a few at a time and it worked for 50 and
fell over at 55.
Can anyone help please, this is really holding up the development of my
project.
Alex
 
G

Guest

Hi

If this works for about 50 or less rows and fails at about 55 rows I would
at first think there is some data between row 50 & 55 that is causing the
problem but I can't see just changing the ControlSource would be an issue.

At what point do you run the code to change the ControlSource and is there
any other code that runs when the form is displayed?

Regards

Andy Hull
 
P

Paradigm

I have tracked it down to a bug in Access 2K. The code and system works fine
in Access 2003.
Alex
 

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