Charlotte Foust
cfoust at infostatsystems.com
Mon Apr 18 10:42:54 CDT 2005
I've never found that to be true, Rocky, and I have used labels as light weight "buttons" in several recent versions of Access. What does the declaration for the procedure look like? Charlotte Foust -----Original Message----- From: Rocky Smolin - Beach Access Software [mailto:bchacc at san.rr.com] Sent: Sunday, April 17, 2005 9:36 PM To: AccessD at databaseadvisors.com Subject: [AccessD] On Click Event in Command button versus Label; 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com