[AccessD] Back again....

A.D.TEJPAL adtp at hotmail.com
Sat Mar 3 06:24:41 CST 2007


Bruce,

    Welcome back!

    During open event, the form is supposed to be still in a state of flux. Preferably, use of this event should be confined to those situations where it is intended to use the Cancel feature inherent in it. Otherwise, everything else can normally be placed either in the load event (for one time firing) or activate event for repeated firing (e,g, DoCmd.Restore) as required.

    DoCmd.GoToRecord action requires the target form to have the focus. There should not be any problem while using it in load event of a form. For navigation to a particular record via code executed from an external form, FindFirst method of form's recordset (not the clone) is found convenient as it does not need any extra code for synchronizing the bookmark. It has however to be noted that recordset approach can not take you to new record. For that, DoCmd.GoToRecord method becomes necessary.

    Each implementation of Filter action on a form at run time forces requery as well. This takes the form to first control on first record. If it is desired to move to a particular record (after filter or sort action), value of primary key control has to be gathered before hand, to be eventually used for navigating to destination record.

Best wishes,
A.D.Tejpal
---------------

  ----- Original Message ----- 
  From: Bruce Bruen 
  To: accessd at databaseadvisors.com 
  Sent: Saturday, March 03, 2007 10:49
  Subject: [AccessD] Back again....


  Hi folks,

  I'm baaaaack!  After a long absence in the wonderful world of penguins and prostgres I've got another job with an M$-bound client.  So its back to Access to get the job done.

  What I have though is a perennial problem with forms event handling.  It seems to me that the way A23k is processing form events is inconsistent at the least.  Let me give a few examples.

  1. The standard open event sequence is disturbed by any action taken within a handler for that event that affects screen rendering.  So, putting a DoCmd.Maximize in the onOpen handler for instance causes an immediate and cascaded Load=>Resize=>GotFocus=>Resize chain to occur.  I realize that the "proper place" for the maximize is in the onActivate handler, but this is an example to better explain the following...

  2. There appears to be no way to get a consistent, i.e. across the board, way to get a "DoCmd.GotoRecord acRecord" to happen.  I have tried to put it in the onLoad handler, but then Shift F9 doesn't fire this??   

  3. Similarly, filtering or sorting (in a continous records form) keeps putting the bookmark back at the first record in the dataset.  Is there no built in way to keep the bookmark at the current record?

  4. Conditional formatting on a continuous form generates multiple refreshes which is a major eyesore on the load.  I have tried in vain to use Echo False/Echo True in the event handler chain to stop this to no avail.  

  Has anyone got a solution?
  -- 
  regards

  Bruce
  -- 


More information about the AccessD mailing list