Multi Page Control -Setting Focus


Posted by Angie Dickinson on October 25, 2001 9:25 AM

I have a multi page control which has 4 pages. I have managed to set focus to the second page after i update the combobox which is the last control on the first page. I am running into some problems when i try to set focus to the third page after updating the last control on the 2nd page which is a textbox.
Here is the code i am using

Private sub lossdetails_afterupdate()
MultiPage1.Value=1
MultiPage1.Pages(1).nametp.setfocus
End Sub

I get the error message run time error 438
object does not support this property or method.

Can anyone help me with what I am doing wrong

Thanks



Posted by Stan on October 25, 2001 10:06 AM

Angie Dickinson(?)

I think what you are trying to do is this:

Say you want the second page to show when the item selected in the combobox is "Go to Page 2". You would write:

Private Sub ComboBox1_Change ()
If ComboBox1.Text = "Go to Page 2" Then
Me.Multipage1.Value = 2
End If

Similarily, for the TextBox

Private Sub TextBox1_Enter()
If TextBox1.Text = "Go to Page 3" then
Me.MultiPage1.Value = 3
end if

How's that?