Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Add Record

Discussion in 'Information Technology' started by Rusty, Jul 28, 2006.

Tags:
  1. Rusty

    Rusty
    Expand Collapse
    Guest

    Can I make the form cycle forward to a new blank record as soon as a specific
    field is populated with data?

    That would be much faster than using the mouse to slide down to the bottom
    of the form to click on the "Add Record" button!
    --
    Rusty
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Record single day paddy arrival in Punjab (New Kerala) Breaking News Oct 11, 2007
    Sikh News Paddy production hits a record high in Punjab (New Kerala) Breaking News Sep 28, 2007
    Sikh News Paddy production hits a record high in Punjab (ANI via Yahoo! India News) Breaking News Sep 27, 2007
    I Will Miss You... We Had A Good Go... So Long Gallbladder! Blogs Jan 24, 2016
    Rolling the addiction ball Blogs Oct 17, 2015

  3. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 6 Jul 2006 16:01:02 -0700, Rusty
    <Rusty@discussions.microsoft.com> wrote:

    >Can I make the form cycle forward to a new blank record as soon as a specific
    >field is populated with data?
    >
    >That would be much faster than using the mouse to slide down to the bottom
    >of the form to click on the "Add Record" button!


    Sure. One way is to use the keyboard Tab key to navigate from field to
    field, and make this control the last field in the tab order. If the
    form's Cycle property is set to New Record, the record will be saved
    and you'll go to the new record.

    If you prefer to use the mouse, you can use code in the control's
    AfterUpdate event - but you have no guarantee that the user will have
    filled in the *OTHER* controls on the form; you may need to put some
    validation checks in the Form's BeforeUpdate event. The code would be
    something like

    Private Sub txtLastControl_AfterUpdate()
    ' force a save of the record
    If Me.Dirty = True Then Me.Dirty = False
    ' jump to the New Record
    DoCmd.GoToRecord acForm,Me.Name, acNewRecord
    End Sub

    John W. Vinson[MVP]
     
  4. Rusty

    Rusty
    Expand Collapse
    Guest

    I would prefer to not have to touck any part of the computor. Once the last
    field in the tab order has the qualified data, I would like it to save the
    record and cycle to a new blank record automatically.
    --
    Rusty


    "John Vinson" wrote:

    > On Thu, 6 Jul 2006 16:01:02 -0700, Rusty
    > <Rusty@discussions.microsoft.com> wrote:
    >
    > >Can I make the form cycle forward to a new blank record as soon as a specific
    > >field is populated with data?
    > >
    > >That would be much faster than using the mouse to slide down to the bottom
    > >of the form to click on the "Add Record" button!

    >
    > Sure. One way is to use the keyboard Tab key to navigate from field to
    > field, and make this control the last field in the tab order. If the
    > form's Cycle property is set to New Record, the record will be saved
    > and you'll go to the new record.
    >
    > If you prefer to use the mouse, you can use code in the control's
    > AfterUpdate event - but you have no guarantee that the user will have
    > filled in the *OTHER* controls on the form; you may need to put some
    > validation checks in the Form's BeforeUpdate event. The code would be
    > something like
    >
    > Private Sub txtLastControl_AfterUpdate()
    > ' force a save of the record
    > If Me.Dirty = True Then Me.Dirty = False
    > ' jump to the New Record
    > DoCmd.GoToRecord acForm,Me.Name, acNewRecord
    > End Sub
    >
    > John W. Vinson[MVP]
    >
     
  5. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 6 Jul 2006 17:22:02 -0700, Rusty
    <Rusty@discussions.microsoft.com> wrote:

    >I would prefer to not have to touck any part of the computor. Once the last
    >field in the tab order has the qualified data, I would like it to save the
    >record and cycle to a new blank record automatically.


    Ummmm...

    and you don't want to do anything (i.e. touch the computer) to make
    this happen?

    I'm sorry, you lost me there!

    If you're tabbing from field to field, what you describe is the
    default action. You don't need to do ANYTHING to make it happen.

    John W. Vinson[MVP]
     
  6. Rusty

    Rusty
    Expand Collapse
    Guest

    I have a scale device (periferal) that sends the weight to the last data
    entry field. As soon as that field is populated I would like the form to save
    the record and open a blank record for the next animal.
    --
    Rusty


    "John Vinson" wrote:

    > On Thu, 6 Jul 2006 17:22:02 -0700, Rusty
    > <Rusty@discussions.microsoft.com> wrote:
    >
    > >I would prefer to not have to touck any part of the computor. Once the last
    > >field in the tab order has the qualified data, I would like it to save the
    > >record and cycle to a new blank record automatically.

    >
    > Ummmm...
    >
    > and you don't want to do anything (i.e. touch the computer) to make
    > this happen?
    >
    > I'm sorry, you lost me there!
    >
    > If you're tabbing from field to field, what you describe is the
    > default action. You don't need to do ANYTHING to make it happen.
    >
    > John W. Vinson[MVP]
    >
     
  7. John Vinson

    John Vinson
    Expand Collapse
    Guest

    On Thu, 6 Jul 2006 21:14:01 -0700, Rusty
    <Rusty@discussions.microsoft.com> wrote:

    >I have a scale device (periferal) that sends the weight to the last data
    >entry field. As soon as that field is populated I would like the form to save
    >the record and open a blank record for the next animal.


    Thank you for the explanation. You *didn't say that* and therefore *I
    didn't know that*. Sorry my telepathy was on the blink!

    Set the AutoTab property of the textbox to Yes. The scanned value must
    be as many characters as the defined size of the field for this to
    work.

    John W. Vinson[MVP]
     

Share This Page