Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2005

Tip: Looking for answers? Try searching our database.

double click cmd button on subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ajw - 15 Mar 2005 18:31 GMT
I have a subform on a main form that has a command button that I wanted to
use a single click as well as a double click event.  I have VBA code for
both the click event and double-click events.  When I try to double click
the command button, I always go to the click event.  Is this a limitation
of a command button, a sub-form, or am I doing something wrong with trying
to use a double click event with a command button?
Thanks for any help
Sandra Daigle - 15 Mar 2005 19:57 GMT
Well I was curious so I set up a simple test on a simple form and you're
right - it doesn't work. Here's what the Help (Access 2002) has to say:

"The second click may have no effect (for example, if the Click macro or
event procedure opens a modal dialog box in response to the first Click
event). To prevent the second Click macro or event procedure from running,
put a CancelEvent action in the DblClick macro or use the Cancel argument in
the DblClick event procedure. Note that, generally speaking, double-clicking
a command button should be discouraged."

Clear as mud right? FWIW, I tried using the Cancelevent and it still doesn't
work. Regardless, I still would agree with their last point -
"double-clicking a command button should be discouraged." I think it makes
for a confusing UI - command buttons should be activated by a single click.

Signature

Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

> I have a subform on a main form that has a command button that I
> wanted to use a single click as well as a double click event.  I have
[quoted text clipped - 4 lines]
> command button?
> Thanks for any help
ajw - 15 Mar 2005 22:17 GMT
Thanks for the response.
I had an update button that would update the single current record, but
have a need to update all the same type records.  I just thought that
having one button handle both would be neater, but it probably would be
more confusing using a single click and double-click than to just add the
second command button.
thanks again for your help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.