Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    75

    Unanswered: tabbing from subform to main form

    I have a form with several subforms on it. When first opening this form, the user would enter data into the first of the subforms. The problem comes when they use the Tab key to cycle thru the fields in this subform....it's all fine, until they get to the last field and press Tab, at which point it tabs back to the first field in that subform, in a new record (especially bad since there should only be the one new record entered into this subform at any one time). I would like for it to tab out from the last field on the subform to a control on the main form instead...I've tried using .SetFocus, which does make it jump to the right control, but it still also goes to a new record in the subform. Any suggestions how to stop it doing that?
    Thanks for any help!
    btw, what's the difference between the Exit and LostFocus events?

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    tabbing

    Using the setfocus command, could it be going to a new record because the 'cycle' property of the form is set to All Records verses Current Record? Maybe changing this or even the Allow Additions property of the form would help (but if you change the Allow Additions property, you may have to write some code to set it to true again if you want to add a new record.)
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Oct 2004
    Posts
    75
    ahh yes, it was the Cycle property, too easy, thanks pk

Posting Permissions

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