problem with command button

ehdoh

Registered User.
Local time
Today, 06:31
Joined
Jun 24, 2003
Messages
58
On the latest form I developed, there seems to be an issue with the command buttons. When one approaches the command buttons by tabbing through the form, there is no problem - i.e., one can press enter or return and the action of the command button is prompted. But a user is not always allowed to skip ahead from an earlier control to a command button on their own by just using the mouse to click the command button. This is happening on multiple command buttons, all of which are set to be enabled, in full view, etc. Here is what the code behind these command buttons looks like (almost invariably):

Private Sub Command187_Click()
On Error GoTo Err_Command187_Click


DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "text182"

Exit_Command187_Click:
Exit Sub

Err_Command187_Click:
MsgBox Err.Description
Resume Exit_Command187_Click

End Sub

Can anyone help determine why these problems might be occurring?

Thanks in advance for your help,
E.H.
 
Hum...

Have you tried setfocus instead of GoToControl?

kh
 
or docmd.gotcontrol [text182]
 

Users who are viewing this thread

Back
Top Bottom