Using the active X calendar

CFP - Jason

Registered User.
Local time
Yesterday, 22:10
Joined
Jun 9, 2003
Messages
54
how can i use that default access calendar to open a report of the schedule of that day? is that even possible with that basic calendar?
thanks
jason
 
Here's the basics:

1 - Create an unbound form and place the ActiveX calendar control on it - name it atxCalControl

2 - Create an unbound text box on the form and name it txtClickVal

3 - The ActiveX Calendar control doesn't have an 'On Click' Event procedure so you will need to create one. To do this simply open the form in design view and open the code for the form. (if you unfamiliar with this click the view menu and select 'Code' from the list. The code display for the form will open. Past the following in the code module and close/save the form:

Private Sub atxCalControl_Click()
Me.txtClickVal.Value = Me.atxCalControl.Value
Me.Refresh
End Sub

4 - Build a query with the information that you want to see in the report in it. In the date field put this in the criteria:

Forms!YOURFormNameWIthTheCalendar!txtClickVal

5 - Create a report that has the query you just built as the record source.

6 - on the form with the calendar create a button using the wizard and have it open the report

Variations on this include: opening the report on the user created 'On CLick' event on the form with a DoCmd Line like:

DoCmd.OpenReport "YourReportName", acPreview

after the 'me.refresh" OR other possible ways to do it. Hopefully this is enough to get you started....

HTH,
Kevin
 
thanks guys, im am gonna try this out and see how is works out.
jason
 

Users who are viewing this thread

Back
Top Bottom