Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form HasModule = Yes Causes Error 2146500594

Status
Not open for further replies.

idbr

MIS
May 1, 2003
247
GB
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
 
Forgot - error only happens on Create_Controlset

Ta, Iain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top