[AccessD] Subform => New Record first?

A.D.Tejpal adtp at touchtelindia.net
Mon Oct 27 11:10:39 CST 2003


Sander,

    You may like to have a look at the sample database file named AddDataAtTop.zip (demonstrating three  styles of data entry at the top of a subform) just prepared by me. 

    It is available at Rogers Access Library (Other Developer's Section) and can be accessed at the following link -
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Tejpal,A.D.

    The db is in Access 2000 file format, developed on Access XP installation. Some of the salient features are outlined in the note given below.

Regards,
A.D.Tejpal
--------------
Description (AddDataAtTop.zip) -
      This database demonstrates three styles of data entry at top of a subform -
    (a) Continuous Form Display (Using Command Button) - 
        Data is entered via unbound text boxes in subform header, using command button on the parent form. Freshly added Record is highlighted in green, while other recent records added in current session are shown in orange.
    (b) Datasheet Display (Using Command Button) - 
        On clicking the command button on parent form, fresh blank record (highlighted in green) is presented at the top of subform for enabling data entry. Recent records added in current session are shown in orange.
    (c) Datasheet Display (Auto - No command button) -
        On opening the main form, user is presented with fresh blank record (highlighted in green) at the top of subform. As soon as data entry commences in this record, its back color changes to yellow, while another fresh blank record (in green) is offered at top. All other recent records added in current session are shown in orange.
---------------------------------------------
  ----- Original Message ----- 
  From: Sad Der 
  To: Access Developers discussion and problem solving 
  Sent: Monday, October 27, 2003 17:59
  Subject: Re: [AccessD] Subform => New Record first?


  thnx everybody. A lot of answers with different
  solutions to the problem. Two subforms will work but I
  I'll go for the idea of Reuben, very nifty :-)

  Regards,
  Sander

  --- Rocky Smolin - Beach Access Software
  <bchacc at san.rr.com> wrote:
  > How about two subforms - one on the top of the form
  > where you only enter new
  > records, one on the bottom with all the current
  > records and no additions
  > allowed.  In the After Update event of the top
  > subform, requery the bottom
  > subform.
  > 
  > Rocky
  > 
  > ----- Original Message ----- 
  > From: "Charlotte Foust" <cfoust at infostatsystems.com>
  > To: "Access Developers discussion and problem
  > solving"
  > <accessd at databaseadvisors.com>
  > Sent: Friday, October 24, 2003 5:42 PM
  > Subject: RE: [AccessD] Subform => New Record first?
  > 
  > 
  > > It's the only way to get the "new record" at the
  > top of a continuous
  > > form, and it has the advantage of allowing for an
  > "undo" easily.
  > >
  > > Charlotte Foust
  > >
  > > -----Original Message-----
  > > From: Kath Pelletti
  > [mailto:SDSSoftware at optusnet.com.au]
  > > Sent: Friday, October 24, 2003 4:22 PM
  > > To: Access Developers discussion and problem
  > solving
  > > Subject: Re: [AccessD] Subform => New Record
  > first?
  > >
  > >
  > > Very clever. I like it
  > >   ----- Original Message ----- 
  > >   From: Reuben Cummings
  > >   To: Access Developers discussion and problem
  > solving
  > >   Sent: Saturday, October 25, 2003 1:07 AM
  > >   Subject: RE: [AccessD] Subform => New Record
  > first?
  > >
  > >
  > >   Something I have done on several occasions to
  > handle this very thing
  > > is to
  > >   basically ignore the subform as the solution,
  > but rather put unbound
  > > fields
  > >   on the main form directly above the fields of
  > the subform.
  > >
  > >   If you do not have the subform sunken you can't
  > hardly tell they are
  > > not in
  > >   the subform (I usually leave mine sunken
  > though).
  > >
  > >   The user inputs the new data into the unbound
  > fields of the main form,
  > >   clicks an add button.  You validate the data,
  > write the data to the
  > > table
  > >   and requery the subform.  And if that record
  > needs to be at the top
  > > then
  > >   just set the sort order accordingly.
  > >
  > >   Reuben Cummings
  > >   GFC, LLC
  > >   phone: 812.523.1017
  > >   email: reuben at gfconsultants.com
  > >
  > >   > -----Original Message-----
  > >   > From: accessd-bounces at databaseadvisors.com
  > >   >
  > [mailto:accessd-bounces at databaseadvisors.com]On
  > Behalf Of Andy Lacey
  > >   > Sent: Friday, October 24, 2003 9:00 AM
  > >   > To: Access Developers discussion and problem
  > solving
  > >   > Subject: Re: [AccessD] Subform => New Record
  > first?
  > >   >
  > >   >
  > >   > Sander
  > >   > I know what you mean. My users often don't
  > like this either. The
  > > answer to
  > >   > your question is no (I think) but a workaround
  > is to place a
  > >   > command button
  > >   > in the header called "Add New Record" or
  > whatever and behind there
  > > put:
  > >   >
  > >   > DoCmd.GoToRecord , , acNewRec
  > >   >
  > >   > It still goes to the bottom of the list but at
  > least the user
  > > doesn't have
  > >   > to scroll down.
  > >   >
  > >   > There is another technique which may work but
  > depends on your data
  > > to an
  > >   > extent. If, say, the data your subform is
  > bound to has a date
  > >   > created field,
  > >   > and if your user is happy to see the data in
  > desc order of date (ie
  > > newest
  > >   > at the top), then you can do the following:
  > >   >
  > >   > DoCmd.GoToRecord , , acNewRec
  > >   > me!DateField=Now()
  > >   > me.requery
  > >   >
  > >   > This will add the new record with the latest
  > date then the
  > >   > requery will sort
  > >   > it to the top. Doesn't always suit, but can
  > sometimes be effective.
  > >   >
  > >   > --
  > >   > Andy Lacey
  > >   > http://www.minstersystems.co.uk
  > >   >
  > >   >
  > >   >
  > >   >
  > >   > --------- Original Message --------
  > >   > From: "Access Developers discussion and
  > problem solving"
  > >   > <accessd at databaseadvisors.com>
  > >   > To: "Acces User Group"
  > <accessd at databaseadvisors.com>
  > >   > Subject: [AccessD] Subform => New Record
  > first?
  > >   > Date: 24/10/03 13:37
  > >   >
  > >   >
  > >   > Hi group,
  > >   >
  > >   > I've got a subform. When I scroll through the
  > records
  > >   > it is possible to add a record. However I
  > first have
  > >   > to tab through all records (or use the
  > scrollbar).
  > >   >
  > >   > Is it possible to have the new line (to insert
  > a new
  > >   > record) appear on top (as the first line)?
  > >   >
  > >   > So you see an empty line and below it are all
  > >   > detailrecords.
  > >   >
  > >   > Hope this makes sence.
  > >   >
  > >   > TIA
  > >   >
  > >   > SD



More information about the AccessD mailing list