[AccessD] On Click Event in Command button versus Label;

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Sun Apr 17 23:36:22 CDT 2005


Dear List:

Is there a difference in how the On Click event works for a command button versus a label in Access 2003.

I had a form that was working with command buttons.  But the gray command buttons are ugly.  So I substituted a label and put the code from the command button behind the label.  

When you click this button (or label) it opens another form, makes the calling for invisible until the called form closes:

            DoCmd.OpenForm "frmActivitiesInBed"
            Me.Visible = False
            Do While SysCmd(acSysCmdGetObjectState, acForm, "frmActivitiesInBed") <> 0
               DoEvents
            Loop

This works real well when in a command button On Click but when it's called in a label's On Click, the system totally hangs with 100% CPU usage.  

Another curious symptom: If I alt-Tab away from the app window while it's froze, and back again, it unfreezes the app.  

Does this sound familiar to anybody?

MTIA,

Rocky Smolin
Beach Access Software
http://www.e-z-mrp.com
858-259-4334



More information about the AccessD mailing list