Visual Basic - objeto DTPicker y enter

Life is soft - evento anual de software empresarial
 
Vista:

objeto DTPicker y enter

Publicado por YAMILETH (24 intervenciones) el 14/03/2007 19:04:55
Hola nuevamente solicitando su ayuda
Necesito que al dar ENTER un objeto DTPicker el enfoque cambie al siguiente objeto.
El mismo codigo que utilizo para un TextBox o ComboBox no funciona para un DTPicker y es el siguiente
If KeyAscii = 13 Then
SendKeys "{TAB}"
End If
De antemano agradecida por la ayuda que puedan brindarme
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:objeto DTPicker y enter

Publicado por Victor (11 intervenciones) el 14/03/2007 21:52:28
bueno por hay la llevas solo cambiale envez de mandar la tecla tab:

If KeyAscii = 13 Then
Text1.SetFocus 'cualquier objeto que quieras
End If
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:objeto DTPicker y enter

Publicado por yamileth (24 intervenciones) el 15/03/2007 18:02:01
Hola, ya probe tambien asi y no funciona, unos dtp son fecha y otros hora y nada que ver, tendre que activar o desactivar algo para que el dtp acepte el enter o el evento KeyPress, solo me trabaja con TAB. Coloque una interrupción dentro del codigo de KeyPress pero aparentemente no entra me imagino que es por eso que no ejecuta las instrucciones.

Private Sub Dtpfecha_admi_KeyPress(KeyAscii As Integer)
a = KeyAscii ****aqui coloque la interrupcion ******
If KeyAscii = 13 Then
DtpHora_Admi.SetFocus
'SendKeys "{TAB}"
End If
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:objeto DTPicker y enter

Publicado por yamileth (24 intervenciones) el 15/03/2007 19:02:37
Bueno, leyendo y leyendo encontre esta solución dada en el año 2003 en este foro
Private Sub Txtfechaegreso_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
SendKeys "{TAB}"
End If
End Sub

y me funciona.
Gracias por la ayuda
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar