Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I am working with a Muti-page object, I want various things to change when one page has focus.

Posted on 2003-11-19
1
Medium Priority
?
156 Views
Last Modified: 2010-05-03
I want various things to change when one page has focus, however I cannot get the form to recognize which page has focus and which does not.  I have tried the following however it did not work.  If there is a different type of object that I should use please let me know I am all ears!  Thanks for any help!!

------  Code  ------
Private Sub MultiPage1_Change()
    If MultiPage1.Value = Page1 Then
        CommandButton20.Visible = False
        CommandButton21.Visible = False
        CommandButton22.Visible = False
        CommandButton23.Visible = False
        CommandButton24.Visible = False
        CommandButton25.Visible = False
        cmdPOP.Top = 24
        cmdPOP.Left = 636
        CBNotice.Top = 42
        CBNotice.Left = 666
        Label5.Visible = True
    ElseIf MultiPage1.Value = Page2 Then
        CommandButton20.Visible = True
        CommandButton21.Visible = True
        CommandButton22.Visible = True
        CommandButton23.Visible = True
        CommandButton24.Visible = True
        CommandButton25.Visible = True
        cmdPOP.Top = 24
        cmdPOP.Left = 636
        CBNotice.Top = 42
        CBNotice.Left = 666
        Label5.Visible = False
    End If
End Sub
-------  Break  -------
0
Comment
Question by:gideonn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 9781180
Try:

If MultiPage1.Value = 0 Then

ElseIf MultiPage1.Value = 1 Then

ElseIf ....

End if

or:

Select Case MultiPage1.Value
     Case 0

     Case 1

     Case ...

End Select


0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question