Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calendar Control Problem - MS ACCESS 2000

Status
Not open for further replies.

salisha

IS-IT--Management
Feb 24, 2003
28
US
I need to add a calendar control to a MS ACCESS 2000 Form.
I need to be able to click on a button and the calendar will pop up. After I click on the date I wanted from teh calendar, I need to add that date tothe date field.
How would I do that?
 
I came up with this code. It works fine for MS Access 97 but not for MS access 2000. What am i doing wrong???

Dim frmCal As Form ' calendar form
Dim ctlD As Control ' date control on this form

Set ctlD = Me!DoB
DoCmd.OpenForm "frmCalendar", , , , , acHidden
Set frmCal = Forms("frmCalendar")
With frmCal
Set .DateControl = ctlD
.InitialDate = ctlD.Value
.Visible = True
End With


I get the error "Application-Defined or Object-Defined Error"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top