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 / October 2005

Tip: Looking for answers? Try searching our database.

Why does my command button requires two clicks?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
M Skabialka - 14 Oct 2005 20:27 GMT
I have a form with a continuous forms subform.  For each record in the
subform there is a command button which opens a popup form to make changes
to the data on that record and some related records.

But, when I click on the command button nothing happens; I click again and
the popup window opens up and functions as expected.

Other command buttons on the main form work on the first click, as they
should.

What could cause this hesitation requiring a second click on this command
button on the subform?

Thanks,
Mich
Rick B - 14 Oct 2005 20:35 GMT
Is the code in the onclick event?

Signature

Rick B

>I have a form with a continuous forms subform.  For each record in the
>subform there is a command button which opens a popup form to make changes
[quoted text clipped - 11 lines]
> Thanks,
> Mich
M Skabialka - 14 Oct 2005 20:57 GMT
The OnClick [Event Procedure] is:

Private Sub cmdReview_Click()
On Error GoTo Err_cmdReview_Click

   'Do stuff here to validate field data before opening other popup
form....
   DoCmd.OpenForm "frmPopupForm"

Exit_cmdReview_Click:
   Exit Sub

Err_cmdReview_Click:
   MsgBox Err.Description
   Resume Exit_cmdReview_Click

End Sub

Nothing should require a second click!

> Is the code in the onclick event?
>
[quoted text clipped - 13 lines]
>> Thanks,
>> Mich
Ken Snell [MVP] - 14 Oct 2005 21:19 GMT
Maybe some code is running in the subform control's Enter event? Or the
subform's Current event? This might "tie up" the interface such that it
doesn't see the first click?

Signature

       Ken Snell
<MS ACCESS MVP>

>I have a form with a continuous forms subform.  For each record in the
>subform there is a command button which opens a popup form to make changes
[quoted text clipped - 11 lines]
> Thanks,
> Mich
M Skabialka - 14 Oct 2005 21:31 GMT
On Current:

Private Sub Form_Current()

   ChangesFlag = False
   If [%Complete] = 100 Then
       'Lock all dates - task is complete
       [%Complete].BackColor = 3669920 'green
       LockDates = True
   Else
       [%Complete].BackColor = 16777215 'white
   End If

'And a few other field color changes...

End Sub

No other events, nothing seems as though it should tie it up..

> Maybe some code is running in the subform control's Enter event? Or the
> subform's Current event? This might "tie up" the interface such that it
[quoted text clipped - 15 lines]
>> Thanks,
>> Mich
Ken Snell [MVP] - 14 Oct 2005 21:54 GMT
Doesn't seem that that should cause the need for a two-click operation.

Can you post the entire code for the Click event? It may be a timing
issue.....

Signature

       Ken Snell
<MS ACCESS MVP>

> On Current:
>
[quoted text clipped - 34 lines]
>>> Thanks,
>>> Mich
 
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.