Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tab Order Problem (2003 (11.6566.8036) SP2)

    Hi there!

    I have a problem with tabbing round a form and then being faced with the program advancing to the BeforeUpdate procedure before I want it to. I.e Users tab in an order from field to field making changes if so desired, but at a certain point and this depends on the order, if the next tab stop is a field which has the tab stop set to "No", BeforeUdate is executed. This becomes irritating for the users as they only want to save the record when they are ready and when asked if they want to save. Clicking "No" discards any changes they have made. Further, if I set all tabstops to "Yes" then when they reach the end of the Tabs, rather than the next tab going back to the first in the order, the code once again proceeds to the BeforeUpdate section.

    1) I'm a bit puzzled as to why tabbing to a field that has its tabstop set to "No" is causing BeforeUpdate to run. I would expect that field to just be skipped and the next in line to be selected (If TabStop "Yes" of course.).

    and

    2) If this is the norm, What I think I would like to do in this respect, is rather than making all fields available by setting the Tab stop property to "Yes", devise some form of check, perhaps with TabIndex, that says If the Index is >= a certain integer, then maybe set the order back to the start. Only point here is I'm not fully sure how to use the TabIndex property.

    Clicking on these fields doesn't cause this problem.

    If anyone can shed any light here or make any suggestions, I would be most grateful.

    Cheers,

    Niven

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Tab Order Problem (2003 (11.6566.8036) SP2)

    The TabStop setting doesn't affect the BeforeUpdate event. My guess is the next valid TabStop (that is, the first one set to True) is a subform. Moving to a subform automatically saves the record on the mainform. Either that, or you are tabbing off the record and Access is trying to move to the next record, which also mean it will try to save the current record.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

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

    Re: Tab Order Problem (2003 (11.6566.8036) SP2)

    When the focus is on the last control in the tab order (with TabStop = Yes), the Tab key will move to the first control in the next record.

    You could set the Cycle propery of the form as a whole to Current Record instead of All Records. That way, the Tab key won't move to the next record.

  4. #4
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Order Problem (2003 (11.6566.8036) SP2)

    Many thanks your reply.

    Both your guesses were right. 1) I have a subform that I thought I had set the TabStop to "No", but was in fact "Yes" and 2) having set that to "No" the tabs then went in search of the next record. I have rectified this by using Hans suggestion of Cycling the records from "All" to "Current Record".

    Cheers, <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

    Niven

  5. #5
    3 Star Lounger
    Join Date
    Nov 2003
    Location
    London, Gtr London, England
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tab Order Problem (2003 (11.6566.8036) SP2)

    Aha!

    By re-ordering the fields into TabStop = "Yes" and then "No" order (and obviously into the order the users want to tab by) and then setting the Forms property Cycle to Current Record, this has rectified the situation nicely.

    Many thanks,

    Niven <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30>

Posting Permissions

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