run time error 2467

  • Thread starter Thread starter Marco
  • Start date Start date
M

Marco

Hello.

I'm trying to run this code: (see below)
and access is returning me this erro:

Run-Time erro: 2467

The expression you entered refers to an object that is closed or doens't
exists.

What I'm doing wrong?


If Me.FechadoQA = True Then
Me.RecordsetType = 3
Me.TabCtl125.Pages(127).Enabled = False
Me.TabCtl125.Pages(128).Enabled = False
Else
Me.RecordsetType = 1
Me.TabCtl125.Pages(127).Enabled = True
Me.TabCtl125.Pages(128).Enabled = True
End If


THANKS
 
Do you really have 128 tabs in the tab control??? Seems excessive


This type is for a Microsoft Access project (.adp) snapshot:
Me.RecordsetType = 3

This type is for a Microsoft Access database (.mdb) Dynaset (Inconsistent
Updates):
Me.RecordsetType = 1


This type is for a Microsoft Access database (.mdb) snapshot:
Me.RecordsetType = 2


Do you have an .MDB or an .ADP??



HTH
 
Hello,

Yes you're right, how stupid I was. I was confisuint the page index with the
mane name.

Sorry.......


I have MDB file. I changed to 2 for snapshot and 0 to return to dynaset.

Thanks.
Marco
 
Steve Sanford said:
Do you really have 128 tabs in the tab control??? Seems excessive

Indeed it does. But the code actually asumes that there are 129 pages. The
Pages collection is zero-based, so Pages(128) refers to the 129th page.
Possibly that may be the cause of the problem if the original poster wasn't
aware that the collection is zero-based.
 
Back
Top