calendar control

J-F

Registered User.
Local time
Today, 06:28
Joined
Nov 14, 2001
Messages
41
Please, Please Help!!!

I have a DB called Duties where each record is a seperate day, the day being shown in field Duty_Date. On the form, I have a calendar control which I want to use to jump to the date selected.

Could anyone help me out please.

Thanks in advance.

J-F
 
It's not clear from your message if you want to have the calendar control update the field or have the field date be reflected on the calendar control. To do the former, put a command button with the calendar control with this in the OnClick property:

[Duty_Date]= [Calendar Control Name]!SelectDate.Value

making sure to substitute the correct names
 
Thanks for your reply. I've implimented that but as far as using the calendar control to navigate, I suppose I could work out the serial date difference between the displayed date and the click date and forward or backward navigate x number of records. Comments please!!!
J-F
 
You could also use the calendar value in the query. I assume the Duty_Date field is a date and not a day. In your query for the form displaying the records set the criteria for the Duty_Date field to [Forms]![FormWhereCalendarIs]![CalendarName].[Value]
and on the on_click property of the calendar, set it to requery your form with the records in. A word of caution though, Do not put the calendar and records on the same form as it causes a crash (well it did with me anyway) I have the calendar on the main form and the records in a subform.
hth
 

Users who are viewing this thread

Back
Top Bottom