I need to add many records with the same date in my form. So I put a button next to my date text box "dat", that wakes up a calendar. That looks like this:
Calendar.Visible = True
Calendar.SetFocus
Then I put a following code:
Private Sub Calendar_Click()
Me!dat.DefaultValue = "#" & Calendar.Value & "#"
Combo18.SetFocus
Calendar.Visible = False
End Sub
Where Combo18 is the next box below date text box.
I tried also:
Me!dat.DefaultValue = Calendar.Value
and Me.dat.DefaultValue = Calendar.Value
and Me.dat.DefaultValue = "#" & Calendar.Value & "#"
That all leads to a #Name? in my date text box "dat".
Can you help me, please, with this?
Calendar.Visible = True
Calendar.SetFocus
Then I put a following code:
Private Sub Calendar_Click()
Me!dat.DefaultValue = "#" & Calendar.Value & "#"
Combo18.SetFocus
Calendar.Visible = False
End Sub
Where Combo18 is the next box below date text box.
I tried also:
Me!dat.DefaultValue = Calendar.Value
and Me.dat.DefaultValue = Calendar.Value
and Me.dat.DefaultValue = "#" & Calendar.Value & "#"
That all leads to a #Name? in my date text box "dat".
Can you help me, please, with this?