• command button (Access 2000)

    Author
    Topic
    #426365

    I would like to click one button and reveal three subforms.

    The first click would reveal sfrmAddressMailing.
    The second click would hide sfrmAddressMailing and reveal sfrmAddressShipTo.
    The third click would hide sfrmAddressShipTo and reveal sfrmAddressShop.
    The last click would hide sfrmAddressShop.

    I worked with a code from Microsoft Accesses sample forms and this is what I have for the first part. I don’t know how to adjust it so if they continue clicking, they will move through the other addresses.

    Private Sub cmdAddresses_Click()
    Me![sfrmAddressMailing].Visible = Not Me![sfrmAddressMailing].Visible
    If Me![sfrmAddressMailing].Visible Then
    Me![cmdAddresses].Caption = “Mailing”
    Else
    Me![cmdAddresses].Caption = “Addresses”
    End If
    End Sub

    Private Sub Form_Open(Cancel As Integer)
    Me![ sfrmAddressMailing].Visible = False
    Me![cmdAddresses].Caption = “Addresses”
    End Sub

    Is there a way to set it up so if they don’t click again for, say 60 seconds, it will hide the last sfrm that was open so only the main form can be seen?

    Viewing 0 reply threads
    Author
    Replies
    • #985263

      We seem to be coming back to the same subject. Instead of using code, I would use a tab control, with each subform on a separate tab. You can set the style for the tab control to Buttons, if you like.

    Viewing 0 reply threads
    Reply To: command button (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: