Activating Calendar Control closes other form
I have been asked to fix a minor problem with an older database. When using calendar control on one form(PROJECTION_QUERY) to set the date, the main switchboard form(f_main) disappears!
f_main is called through an autoexec macro. It has a lot of update code behind it on load.
This is the code loaded when the calendar control opens
Private Sub Form_Load()
If IsNull([set_date]) Then
Me![cal_date] = DATE
Else
Me![cal_date] = set_date
End If
End Sub
and this is the code behind the text box on PROJECTION_QUERY
Private Sub DEMAND_FROM_DblClick(Cancel As Integer)
Set set_date = Me![DEMAND_FROM]
DoCmd.OpenForm "cal_date"
End Sub
Clear as mud, right?
Does anyone have any ideas what to do?
I have been asked to fix a minor problem with an older database. When using calendar control on one form(PROJECTION_QUERY) to set the date, the main switchboard form(f_main) disappears!
f_main is called through an autoexec macro. It has a lot of update code behind it on load.
This is the code loaded when the calendar control opens
Private Sub Form_Load()
If IsNull([set_date]) Then
Me![cal_date] = DATE
Else
Me![cal_date] = set_date
End If
End Sub
and this is the code behind the text box on PROJECTION_QUERY
Private Sub DEMAND_FROM_DblClick(Cancel As Integer)
Set set_date = Me![DEMAND_FROM]
DoCmd.OpenForm "cal_date"
End Sub
Clear as mud, right?
Does anyone have any ideas what to do?