B
BillD
I have a form I use to upate a table. On the form I have a Text Box Named
"Date_LFW" Control Source "Date_LFW". Beside the Text Box I have a Command
Button named "Command310" with an event procedure on click
"Private Sub Command310_Click()
Me.Calendar6.Visible = True
If Not IsNull(Me.Date_LFW) Then
Me.Calendar6.Value = Me.Date_LFW
Else
Me.Calendar6.Value = Date
End If
Exit_cmdCal_Click:
Exit Sub
End Sub"
The event is to open a calendar ActiveX Control:Calendar6 Name...Calendar6
OLE Class...Calendar Class.... MSCal.Calendar7
When I click on a date in the Calender it enters a date in the Text Box
"Date_LFW"
The procedure works but when I close the database and reopen, when I try to
change the date by using the command button and calendar, I get a Program
Error. "MSACCESS .exe has generated errors and will be closed by Windows. You
will need to restart the program. An error log is being created." The
database closes. After reopening the database, If I clear the date in the
text box before selecting a new date when using the command buton and
calendar, then everything works OK.
Question: How do I correct this problem? I want to be able to use the
command button and calendar to change the date as many time as I want without
having to clear the text box first.
Any Help Greatly appreciated.
Bill D.
"Date_LFW" Control Source "Date_LFW". Beside the Text Box I have a Command
Button named "Command310" with an event procedure on click
"Private Sub Command310_Click()
Me.Calendar6.Visible = True
If Not IsNull(Me.Date_LFW) Then
Me.Calendar6.Value = Me.Date_LFW
Else
Me.Calendar6.Value = Date
End If
Exit_cmdCal_Click:
Exit Sub
End Sub"
The event is to open a calendar ActiveX Control:Calendar6 Name...Calendar6
OLE Class...Calendar Class.... MSCal.Calendar7
When I click on a date in the Calender it enters a date in the Text Box
"Date_LFW"
The procedure works but when I close the database and reopen, when I try to
change the date by using the command button and calendar, I get a Program
Error. "MSACCESS .exe has generated errors and will be closed by Windows. You
will need to restart the program. An error log is being created." The
database closes. After reopening the database, If I clear the date in the
text box before selecting a new date when using the command buton and
calendar, then everything works OK.
Question: How do I correct this problem? I want to be able to use the
command button and calendar to change the date as many time as I want without
having to clear the text box first.
Any Help Greatly appreciated.
Bill D.