Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2002
    Location
    UK
    Posts
    12

    Angry Unanswered: tab controls - help please!

    Hi

    I have a main form called frmParent and a subform called frmSub. on frmParent I have a field called txtmodcode. this value changes dependant on a value chosen from a combo box.

    on frmsub I have a tabctl which has 4 pages and a commend button. I want the focus to be set to a page number depending on the value in frmparent!txtmodcode.

    sub_onclick_btn()
    if forms!frmParent!txtmodcode = "U1PS" or forms!frmParent!txtmodcode = "U1PST" Then

    tbctl.SetFocus
    docmd.GoToPage 0

    elseif forms!frmParent!txtmodcode = "U1AHM" or forms!frmParent!txtmodcode = "U1ALM" Then

    tbctl.SetFocus
    docmd.GoToPage 1

    end if
    end Sub

    This code gives me an error message saying that this method is not available.

    what am i missing??

    thanks in advance

  2. #2
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61
    If i understand this correctly you want to select a page and that the subform changes to that page? Or do you want to find a specific record

    A SubForm in aForm can't goto another record using DoCmd.
    Last edited by DeathWing; 11-27-02 at 08:28.

  3. #3
    Join Date
    Nov 2002
    Location
    UK
    Posts
    12
    Originally posted by DeathWing
    If i understand this correctly you want to select a page and that the subform changes to that page? Or do you want to find a specific record

    A SubForm in aForm can't goto another record using DoCmd.
    yes I just want ot to select the page

Posting Permissions

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