ActiveX Control:Calendar

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.
 
B

BillD

Allen Browne's Pop UpCalendar seems to be very easyto install and is easy to
run. the control source was unbound in his sample. The date change to the
text box would not save on closing the form. I set the control source of the
textbox to the date field in the main table. That worked.
Allen's calendar is better than anything I have looked at to date. You can
use the calendar or just enter the date in the field since it is not unbound.
Seems to work great so far. The active X control worked great at first then
seem to get a glitch that I was not capable of correcting. I have 6 date
fields that I needed to use a calendar for. Allen's calendar is so fast to
setup a new date field with calendar.
Thanks again

Bill D.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top