problem accessing property or method in OLE object

C

Chris

Hi,

I have a mainform with a subform that contains another form.
The subform is within a 3 paged tab strip.

On one of the tabs a user can click on a checkbox which changes the
..recordsource value for the subform. Unchecking goes back to another
recordsource
and vice versa.

When I step through the code for when the chkbox is "checked" and get to the:
subform.recordsource = storedprocedurename

I get the following error: Error 2757 " There was a problem accessing a
property
or method of the OLE object"

When I click on the debug button of the window and am returned to the
current running line of code I can press F8 and step right on through, no
more errors and
it works.

Also if I got to the immediate window and type in:
?subform.recordsource
just before firing that line of code, then the error message never pops up.

This must be an environment issue or something.

I'm stumped.

thanks

Chris
 
C

Chris

I found a solution that is'nt the best case but it works.

Inside my error handling I put a statement

if error = 2757 and storeprocedurename = "procedureinquestion" then resume

This causes the program to resume and ignore the error and it works fine.
 

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