Hi,
I'm running a procedure to create and delete controls on a form. I'm trying to replicate a wizard type thing.
On a button click I call two procedures:
Delete_Controlset
Create_Controlset
Delete just deletes all controls on the form not labelled as permanent.
Create makes a new control set.
Both look at a table tblControlsets_Sys, which has all the info needed to identify the controls required.
When I run each procedure on a form where HasModule = No, I have no problems and can delete and create til the cows come home.
On a form where HasModule = Yes, I get runtime error 2146500594 - Automation Error, or occasionally, 2146500594 - Method 'Item' of object 'Form' failed.
It doesn't matter if the module has any code in it.
Has anyone come across this before? Any ideas for a solution?
Thanks, Iain
I'm running a procedure to create and delete controls on a form. I'm trying to replicate a wizard type thing.
On a button click I call two procedures:
Delete_Controlset
Create_Controlset
Delete just deletes all controls on the form not labelled as permanent.
Create makes a new control set.
Both look at a table tblControlsets_Sys, which has all the info needed to identify the controls required.
When I run each procedure on a form where HasModule = No, I have no problems and can delete and create til the cows come home.
On a form where HasModule = Yes, I get runtime error 2146500594 - Automation Error, or occasionally, 2146500594 - Method 'Item' of object 'Form' failed.
It doesn't matter if the module has any code in it.
Has anyone come across this before? Any ideas for a solution?
Thanks, Iain