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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the simple code to store calendar value to the text box

Status
Not open for further replies.

soldieryap

Programmer
Aug 15, 2000
59
MY
Hello, what's the code that's the simple way to store the value to calendar after i click the the date i want? because i use the code of VB5 that cannot use in Access 2000? hope anyone willing to teach ....
 
I have a calandar control form open. When I click on a select button the following code occurs. Hope it helps or gives you an idea of what might work for you.




Private Sub Command3_Click()
On Error GoTo Err_Command3_Click

Forms!DAILYLOG.Text19 = Forms!CalendarCNT.ActiveXCtl0
DoCmd.Close
Forms!DAILYLOG.Requery

Exit_Command3_Click:
Exit Sub


Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click

End Sub

Domonic Hammes
 
Here is a an event procedure I use on control button click to make calendar visible and store date in text field " datefiled". The Active X calendar has been loaded, of course.

Private Sub Toggle17_Click()
If Toggle17 = -1 Then
ActiveXCtl36.Visible = True
Else
ActiveXCtl36.Visible = False
Me!DateFiled = Me!ActiveXCtl36.Value
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top