access can

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access 2003 - Can I add a calendar to a form so it displays prop

Access 2003 - Can I add a calendar to a form so it displays prop

resolvedResolved · Medium Priority · Version 2003

Maewyn has attended:
Access Intermediate course

Access 2003 - Can I add a calendar to a form so it displays prop

Hi. I have added a calendar to my form so that users can easily select a date to complete a field. However I can't get the date selected into the right field, nor can I shrink the calendar down to a small button and only open up when it is clicked on. Any ideas?

RE: Access 2003 - Can I add a calendar to a form so it displays

Hi Maewyn,

Thank you for your question.

There are two possible ways of doing this. if you have added an Active X Calendar Control then you will need to copy the following VBA code into a new procedure in the VBA window.

Private Sub MyCalendar_Click()
Me.Test.Value = Me.MyCalendar.Value
End Sub

In this example the fieldname is called 'Test' and the Calendar Control is called MyCalendar.

Open the form in Design View and do ALT + F11 on the keyboard to open the VBA window. On the left hand side you will see a panel. Double click on the form you created and paste the code into the right hand window.

The date selected on the calendar control will be displayed in the text box.

Alternatively add a Text field in Design View of the form and open the properties window. Change the format of the field to Short Date. When they click into the text box a calendar control icon appears and when selected a drop down calendar appears. Whichever date is selected the date appears in the text box.

I hope this helps you and answers your question.

Regards

Simon

RE: Access 2003 - Can I add a calendar to a form so it displays

Simon, I tried the second one of these but it didn't work at all. The first one I didn't try because we have very limited use of ActiveX here.


I eventually found a control call Microsoft DatePicker, which is in the standard list of controls - many thanks to the blog t http://blogannath.blogspot.com/2010/06/microsoft-access-tips-tricks-using-date.html - and this does exactly what I need.

Maewyn

 

Training courses

 

Training information:

See also:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Access tip:

Run with the total

Often when creating reports with lists of transactions it can be useful to have a column which totals the transactions as the report progresses.

Using the Sum function gives the total for the whole group, not a running total.



Access provides an easy method of achieving a running total.



Click on the text box containing the data you wish to contain the running total.
Select the Data tab
Click in the Running sum option
Click the down arrow to view three options

View all Access hints and tips


Server loaded in 0.07 secs.