Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    command button (Access 2000)

    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?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: command button (Access 2000)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •