Can't Create a Control a TextBox - err 29054

E

Edgar

I opened a Report in Design View and use the CreateReportControl function to
creat a Control, but this Message appears - Access can't add, rename or
delete the control(s) you requested. What's the problem. Please help

Many thanks in advance
 
M

Marshall Barton

Edgar said:
I opened a Report in Design View and use the CreateReportControl function to
creat a Control, but this Message appears - Access can't add, rename or
delete the control(s) you requested. What's the problem. Please help


CreateControl is a design time only operation intended to be
used when you are writing your own wizards.

Maybe you should explain what you are trying to accomplish
so we have a chance to suggest a way to do it.
 
E

Edgar

Marshall,
I wanted to modify a report in design view, close and save it, then get a
reference of that report through a variable (MyReport). This caused the
problem. I found that if I used the string Set Myreport = Report_Test, after
the previous sentence, but in the same procedure, then the message appeared.
What I did was to declare the Set string in an external Sub (Sub
InstanceReport). Now It works Ok.
But something else show up maybe you can help me on.:
I use Me.GroupLevel(0).ControlSource = "FilteredField" in the Open Event of
the report I'm instanciating. and now this is the message:
Err 2191 - You can't set the control Source property in Print Preview or
after Printing has started. But that's the hint given in help to do it.
What do you think is the problem here, my friend.
 
M

Marshall Barton

Edgar said:
I wanted to modify a report in design view, close and save it, then get a
reference of that report through a variable (MyReport). This caused the
problem. I found that if I used the string Set Myreport = Report_Test, after
the previous sentence, but in the same procedure, then the message appeared.
What I did was to declare the Set string in an external Sub (Sub
InstanceReport). Now It works Ok.
But something else show up maybe you can help me on.:
I use Me.GroupLevel(0).ControlSource = "FilteredField" in the Open Event of
the report I'm instanciating. and now this is the message:
Err 2191 - You can't set the control Source property in Print Preview or
after Printing has started. But that's the hint given in help to do it.


That message means that the report is already open and you
can not do that after the open event has been processed.
Remember that opening an aready open report (or form) just
gives it the focus. This may be tangled up in using
Report_Myreport retrieving/creating a fifferent instance
than the one you wanted.

Whatever it is you are trying to accomplish, I feel pretty
sure you are going about it the wtong way.
 
E

Edgar

I fixed it.
When I instanciated the Base Report, the reference opens it and in that
moment pops up the err message. It's like in the previous case. So i defined
a flag (Status = "Instancing") and use it in a if then else clause,
surrounding the open report event.

Thanks for your considerations.
 

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