A
Alex Martinez
Hi,
I am using Access 2002 and below is my code. In my form I have this command
button that will open up another form with a calendar control (Active X) and
when the user select the day it would open up a report in preview. My
problem is after looking at the report or printing it the form with the
calendar control comes back. What I want is to have the calendar control
form to close. How do I do this? Any tips will be appreciated. Thank you
in advance.
Private Sub CalendarWeekEnded_Click()
On Error GoTo Err_CalendarWeekEnded_Click
Dim stDocName As String
textWeekended.SetFocus
textWeekended.Value = CalendarWeekEnded.Value
stDocName = "Weekly Production Bar Graph"
DoCmd.OpenReport stDocName, acPreview
Exit_CalendarWeekEnded_Click:
Exit Sub
Err_CalendarWeekEnded_Click:
MsgBox Err.Description
Resume Exit_CalendarWeekEnded_Click
End Sub
I am using Access 2002 and below is my code. In my form I have this command
button that will open up another form with a calendar control (Active X) and
when the user select the day it would open up a report in preview. My
problem is after looking at the report or printing it the form with the
calendar control comes back. What I want is to have the calendar control
form to close. How do I do this? Any tips will be appreciated. Thank you
in advance.
Private Sub CalendarWeekEnded_Click()
On Error GoTo Err_CalendarWeekEnded_Click
Dim stDocName As String
textWeekended.SetFocus
textWeekended.Value = CalendarWeekEnded.Value
stDocName = "Weekly Production Bar Graph"
DoCmd.OpenReport stDocName, acPreview
Exit_CalendarWeekEnded_Click:
Exit Sub
Err_CalendarWeekEnded_Click:
MsgBox Err.Description
Resume Exit_CalendarWeekEnded_Click
End Sub