Access - CAPTAR FECHAS

 
Vista:

CAPTAR FECHAS

Publicado por maria (32 intervenciones) el 25/02/2005 13:05:12
HOLA NECESITO ACTUALIZAR UN CAMPO FECHA DE REVISION QUE DEBE COGER DE UN SUBFORMULARIO QUE CONTIENE FECHAS, LA ÚLTIMA Y SUMARLE POR EJEMPLO 1 MES Y METERLO EN OTRO CAMPO, PROXIMA REVISION, ¿SE ENTIENDE?
BUENO MI DUDA ES COMO SE COGE DEL SUBFORMULARIO LA ÚLTIMA FECHA, GRACIAS
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:CAPTAR FECHAS

Publicado por 2pl (105 intervenciones) el 25/02/2005 18:41:21
deberias usar un boton de comando y en el vento al hacer click pones
Private Sub BtnFECHA_Click()

Dim DateNew As Variant
On Error GoTo errorBtnFECHA

Me![PROXIMAREVISION].SetFocus
DateNew = GetDate(Me![PROXIMAREVISION])
If Me![PROXIMAREVISION] <> DateNew Or IsNull(Me![PROXIMAREVISION]) Then
Me![PROXIMAREVISION] = DateNew
End If
Me![PROXIMAREVISION].SetFocus

errorBtnFECHA:
Exit Sub

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:CAPTAR FECHAS

Publicado por maria (32 intervenciones) el 28/02/2005 09:30:45
Muchisimas gracias por tu ayuda, pero es que me da un error con la funcion GetDate, ¿la tengo que definir a parte no ?
Gracias de nuevo
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