Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    186

    Unanswered: Preventing subform1 from displaying (blank) new record when move to subform2

    access 2007 - I have a data entry mainform with 2 subforms, all are single form views. Each of these require a single record (all related) per new data.

    My users get nervous about subform1 because when they complete it (tabbing through) I move them to subform2 with setfocus.....and subform1 displays record 2 which is blank.

    I'm thinking of a workaround to display the 1st record in subform1 (that they just created) when they move to subform2.

    Can I write multiple setfocus lines to go back to a record1 control in the subform1 and keep this subform2 setfocus in the same on_exit?
    Private Sub subform1control_Exit(Cancel As Integer)
    Forms!Mainform!subform2_OLD.SetFocus
    DoCmd.GoToControl "subform2control"
    End Sub

    thanks for your help!!!

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I think you can solve this using the subform's Cycle Property, which determines what happens when you tab out of a form's last control.

    Open the form your subform is based on, in Design View, and go to Properties - Other and set the Cycle Property to Current Record.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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