Why does my command button requires two clicks?

M

M Skabialka

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
 
M

M Skabialka

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!
 
K

Ken Snell [MVP]

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?
 
M

M Skabialka

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..
 
K

Ken Snell [MVP]

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.....

--

Ken Snell
<MS ACCESS MVP>

M Skabialka said:
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..

Ken Snell said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top