Make your calendar display the current date when you open the form that hosts it; it positions itself on the correct month and year but the wrong day is highlighted.
The button named Insert Date on the form, when clicked, creates 24 new records for the day you select on the calendar:
Private Sub Comando50_Click()
On Error GoTo aa
Dim rst As New ADODB.Recordset
Dim cnn As ADODB.Connection
Dim i As Integer, a As Integer
Set cnn = CurrentProject.Connection
rst.Open "Consuntivo", cnn, adOpenKeyset, adLockOptimistic
For i = 0 To 23
rst.AddNew
rst!Giorno = CGior.Value
rst!Ora = i
rst.Update
Next i
But I'm not sure what to use in place of CGior.Value where CGior identifies the ActiveX calendar.
The activeX calendar has an event Private Sub CGior_AfterUpdate() that positions the form's cursor on the record corresponding to the date selected on the calendar. How can you do that with your calendar? Maybe you can achieve that by adding code to the click event for each button on your calendar.
The day numbers in the outer columns of your calendar aren't bolded like the central ones.
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (31) |
Tidak ada komentar:
Posting Komentar