G
Guest
Hi, I created a calendar form by following an example in the platinum edition
book "Using Access 97", even though I have Access 2003 and the XP operating
system. I created a blank form, added the ActiveX calendar control and added
some coding to open the form to a specific date and to update a text box and
label box after a user chooses a new date on the calendar. However, one of
the "sub's" in the book is giving me trouble. I typed it below. The sub is
supposed to change the calendar to a previous or next week, month or year,
depending on which of 6 command buttons the user clicks.
Sub cmd{Next|Previous}{Week|Month|Year}_Click()
'Purpose: Use the Next or Previous period method to increment or decrement
the period
ocxCalendar.Object.{Next|Previous}{Week|Month|Year}
End Sub
There is something about a symbol I am using that causes this to not work.
I think it is the symbol separating the next, previous, week, month and year.
It is the two vertical dashes and it is on the back slash key above the
enter key on my keyboard.
Can someone tell me what needs to be changed to make the command buttons
work on this form? Thanks.
The ultimate goal is to have whatever date the user selects on the calendar
be used as the input for a beginning date in a report based on a parameter
query. The user will also have to select a ending date for input into that
report. Again, thanks for the help. I will provide more info as needed.
Andy
book "Using Access 97", even though I have Access 2003 and the XP operating
system. I created a blank form, added the ActiveX calendar control and added
some coding to open the form to a specific date and to update a text box and
label box after a user chooses a new date on the calendar. However, one of
the "sub's" in the book is giving me trouble. I typed it below. The sub is
supposed to change the calendar to a previous or next week, month or year,
depending on which of 6 command buttons the user clicks.
Sub cmd{Next|Previous}{Week|Month|Year}_Click()
'Purpose: Use the Next or Previous period method to increment or decrement
the period
ocxCalendar.Object.{Next|Previous}{Week|Month|Year}
End Sub
There is something about a symbol I am using that causes this to not work.
I think it is the symbol separating the next, previous, week, month and year.
It is the two vertical dashes and it is on the back slash key above the
enter key on my keyboard.
Can someone tell me what needs to be changed to make the command buttons
work on this form? Thanks.
The ultimate goal is to have whatever date the user selects on the calendar
be used as the input for a beginning date in a report based on a parameter
query. The user will also have to select a ending date for input into that
report. Again, thanks for the help. I will provide more info as needed.
Andy