Compile error

A

an

Hi!

I have a form with combobox.
In combo AfterUpdate I have the next: (Thanks George Nicholson)

If me.combobox = n Then
Me.TabCtl2 = 1
Page Index 1
Me.TextboxX.Setfocus
End If

Where TabCtl2 is Tab Control name.

When I tried to compile, highlighted:
..TabCtl2 =

and show error:
Method or data member not found.

What to do, please? (Acc2007)

Thanks in advance.
an
 
A

Arvin Meyer [MVP]

Tab control pages are referred to like:

Me.TabCtl2.Pages(1).SetFocus

and a textbox just needs a reference like:

Me.TextboxX.Setfocus

You do not need to set focus to the Tab Control first.
 
A

an

Thanks for reply.

Return

Compile error:
Wrong number of arguments or invalid property assignment and highlighted
..Pages

an
 
Top