Results 1 to 3 of 3
  1. #1
    mykal66 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    2

    Show Button & Combo when criteria is selected

    I've never used access before so this is my first attempt at creating a database and and need an additional combo box and button to appear on a form only if the 'Declined' Option is selected. I've looked on the forums and got some code i thought would work but it doesn't



    This is the code i have tried.

    Code:
    Private Sub Reject()
    
        If Me.CboStatus = "Declined" Then
            Me.CmbLetter.Visible = True
            Me.CmdLetter.Visible = True
        Else
            Me.CmbLetter.Visible = False
            Me.CmdLetter.Visible = False
        End If
        
    End Sub





    Can anyone help please and point me in direction of what I've done wrong?
    Last edited by mykal66; 07-31-2011 at 04:04 AM. Reason: SOLVED

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Instead of making this a Private sub event, put the code in the after update event for the control cboStatus and in the on load event for the form.

    Alan

  3. #3
    mykal66 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    2
    Quote Originally Posted by alansidman View Post
    Instead of making this a Private sub event, put the code in the after update event for the control cboStatus and in the on load event for the form.

    Alan
    Thanks Alan, works great now. Much appreaciated

    Barry

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box Determines Radio Button Selected
    By sainttomn in forum Forms
    Replies: 5
    Last Post: 08-10-2011, 03:51 PM
  2. Show selected records in subform
    By Papilion in forum Forms
    Replies: 8
    Last Post: 06-18-2011, 07:41 AM
  3. Replies: 2
    Last Post: 06-17-2011, 04:26 PM
  4. Replies: 1
    Last Post: 06-12-2011, 07:08 AM
  5. Criteria to show date range
    By Douglasrac in forum Queries
    Replies: 2
    Last Post: 03-24-2011, 03:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums