Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Location
    Atlanta, GA
    Posts
    62

    Unanswered: .setfocus question

    Hello all,
    I'm new to access and vb and have a question.
    I'm making a medical survey db , basically turning paper forms into fields that goto a table. Because the forms are so long iv'e placed then in a tab sheet when you get to the bottom of 1 sheet you hit the button with this code attatched Forms![main]!TabCtl0 = Forms![main]!TabCtl0 + 1
    Its working fine.
    However i have been doing fine wi the skip statments for questions like " if q 32 is 1 (yes) then skip to q 40" with this If [32]=1 Then [40].set focus all is still good here.
    My question is what happens if q40 is on the next page half way down? i was thinking something like this If [32]=1 Then Forms![main]!TabCtl0 = Forms![main]!TabCtl0 + 1 then [40].setfocus it's not working.
    Again i'm new and having a good time learning so an explaination would be great if you got the time.
    Any help would be appreitiated
    Thanks
    Brownie

  2. #2
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    Have you tried quite simply:

    [40].SetFocus
    Rod

    fe_rod@hotmail.com

  3. #3
    Join Date
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    Alternatively try the

    DoCmd.GoToControl
    Rod

    fe_rod@hotmail.com

Posting Permissions

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