Results 1 to 4 of 4
  1. #1
    joanne21 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2012
    Posts
    6

    combo box value

    Based on the value of a combo box, I want to make the corresponding tab page in a multi-tabbed box have the focus. This should not be difficult but I appear to be missing something.

    [code]
    Private Sub cmdDetails_Click()
    If Me.cboCatmain.Column(0) = "2" then
    Me.Trucks.SetFocus
    End If


    End Sub

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Me.YourTabControlPageName.SetFocus
    I think "Trucks" is your label for that page.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Is Me.cboCatmain.Column(0) a number or a string?

    The number 2 is different than a string "2" (with quotes)

    Might also look at
    http://www.dbforums.com/microsoft-ac...using-vba.html
    Last edited by ssanfu; 12-30-2012 at 02:44 AM. Reason: added URL

  4. #4
    joanne21 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Dec 2012
    Posts
    6
    Quote Originally Posted by amrut View Post
    Me.YourTabControlPageName.SetFocus
    I think "Trucks" is your label for that page.
    Thanks, it works

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

Similar Threads

  1. Replies: 3
    Last Post: 12-11-2012, 09:12 AM
  2. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  3. Replies: 2
    Last Post: 08-16-2012, 10:02 PM
  4. Replies: 4
    Last Post: 08-16-2011, 05:54 PM
  5. Replies: 5
    Last Post: 01-02-2011, 10:09 AM

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