A family of Microsoft relational database management systems designed for ease of use.
kindly, show me in VBA I will try to converted to Macro
Hi Sarah,
This is the code. I hope you can transform it.
The nice thing is that this routine is standard available in any of my applications.
As I work quite a lot with incomplete dates (e.g. ??-feb-1911" or "after 1920"), it works also for these kind of "pseudo" date-controls.
Make_datum is a function that displays the date in my favourite format.
Sub Set_datum(datum_ctl As Control, cur_key As Integer, cur_shift As Integer)
Dim tmp_datum As Date
Dim incr
If (datum_ctl & "" = "") Then
Select Case Chr(cur\_key)
Case ".", ">", ",", "<": tmp\_datum = Date: incr = 0
End Select
ElseIf (IsDate(datum_ctl)) Then
tmp\_datum = datum\_ctl & ""
Select Case Chr(cur\_key)
Case ".", ">": incr = 1
Case ",", "<": incr = -1
End Select
End If
If (Not IsEmpty(incr)) Then
cur\_key = 0
If (cur\_shift = 1) Then
tmp\_datum = DateAdd("m", incr, tmp\_datum)
Else
tmp\_datum = tmp\_datum + incr
End If
datum\_ctl = Make\_datum(tmp\_datum)
datum\_ctl.SelStart = 0
End If
End Sub
Imb.