In response to Brian Famous:<br>
<br>
I have written a rainfall-runoff simulation model in access and want to design a dynamic interface to show rainfall and runoff as the program steps through each day. Previously i have had lots of problems with using dynamic graphs in Access and thought i would add rectangles and scale them to give an indication of the amount of rainfall and runoff on any particular day.<br>
<br>
I have written the following code to add a rectangle to an existing form, which generates the error message outlined in my original post. If I create a new form and use createcontrol in the same way, the code works. But I would prefer to add the rectangles to an existing form.<br>
<br>
Sub test_des_mode()<br>
Dim new_rect As Control<br>
<br>
<br>
DoCmd.OpenForm "runoff", acDesign, "", "", , acNormal<br>
l_val = 1000<br>
t_val = 2000<br>
wd = 1000<br>
ht = 1000<br>
<br>
<br>
Set new_rect = CreateControl("runoff", acRectangle, , "", "", l_val, t_val, wd, ht)<br>
<br>
regards<br>
<br>
Helen Fairweather