[AccessD] The Command underlying the AZ and ZA buttons on theAccess toolbar

A.D.Tejpal adtp at airtelbroadband.in
Mon Dec 24 23:05:16 CST 2007


Arthur,

    There is no guarantee that the last added record will necessarily be at the extreme end of sort order. It would therefore be preferable to ensure that freshly added record occupies the top position, irrespective of its sort rank.

    My sample db named AddDataAtTop might be of interest to you. It is available at Rogers Access Library (other developers library). Link - http://www.rogersaccesslibrary.com/OtherLibraries.asp#Tejpal,A.D.
 
    The sample is in Access 2000 file format and a brief description is given below for ready reference. You could adapt the underlying approach suitably, for your specific needs.
 
Best wishes,
A.D.Tejpal
------------

Brief Description:  (Sample Db - AddDataAtTop)
==========================================
      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: Arthur Fuller 
  To: Access Developers discussion and problem solving 
  Sent: Tuesday, December 25, 2007 02:17
  Subject: [AccessD] The Command underlying the AZ and ZA buttons on theAccess toolbar


  My client is giving me so much aggravation on this! She wants the detail
  records to show up most recent first, meaning that after a detail row is
  added, it automatically drifts to the top of the subform, rather than
  remaining on the bottom. This is easy enough to do, just by clicking the ZA
  button on the toolbar after adding the new record, but what is the VBA
  command constant that represents this command?

  I guess I'll try building a macro and see what code gets generated. If
  anyone already knows how to code this, and has nothing better to do on
  Christmas Eve, let me know. I can't recall ever building a macro in Access,
  but what the hell, I'll give it a shot.

  Well, I gave it a shot, and I have no idea what this weird interface is
  about. Excel macros are soooo much easier! I need to relocate that list of
  Access command things and give that a try instead. The client is adamant
  that she wants the most recent transactions on top, and I can see her point,
  since there could be hundreds per master  record and they show the balance,
  which is the item of most immediate interest, and the transactions of
  immediate interest are those within the last few days to month, so that's
  why they should be on top not at the bottom.

  But I am having a most difficult time arranging this. Any advice greatfully
  appreciated.

  TIA.
  Arthur


More information about the AccessD mailing list