Question : Using Calendar Control 11.0 in Access 2003 on a Tab Control on a Form

I referred to Question #24263618 and used the calendar sample from capricorn.
http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_24263618.html?sfQueryTermInfo=1+10+2003+30+access+calendar+control+form

This works except the date is on a tab control. The calendar pops up and I can select a date, but the date is not saved in the date field. It is blank.
Is there something that I need to change or do something different?

Thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Function OpenCalendar(strForm As String, strCtrl As String) As Date

    DoCmd.OpenForm "frmCalendar"
    Forms!frmCalendar.Caption = "Select " & strCtrl
    Forms!frmCalendar!FormName = strForm
    Forms!frmCalendar!ControlName = strCtrl
    
    
End Function

Sub SetDate()
Dim strForm
Dim strCtrl
Dim wd As Date
   wd = Forms!frmCalendar!Calendar3.Value

strForm = Forms!frmCalendar!FormName
strCtrl = Forms!frmCalendar!ControlName

    Forms(strForm)(strCtrl).Value = wd
    Forms(strForm)(strCtrl).SetFocus
    Forms(strForm).Requery
'    Forms!frmCalendar.Visible = False
DoCmd.Close acForm, "frmCalendar"
End Sub

Answer : Using Calendar Control 11.0 in Access 2003 on a Tab Control on a Form

test this


Random Solutions  
 
programming4us programming4us