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

Multiple Calendar Fields with Command Buttons 1

Status
Not open for further replies.

jimb51

Technical User
Jun 5, 2004
23
US
I have a form with 3 date fields. I'd like to put command buttons next to each field which, when selected, will pop up the ActiveX calendar and fill in the field with the selected date. I can create the command buttons and the calendar form but I'm not sure how to reference that particular date field to the selected date from the calendar. (I'm only using this application in Access 2002 so I'm not concerned about backward or outward compatibility with ActiveX calendar.)
Any ideas?
 
How are ya jimb51 . . . .

In the [blue]AfterUpdfate[/blue] event of the Calendar Control have you tried:
Code:
[blue]Me![purple][b]DateFieldName[/b][/purple] = Me!ActiveCtl[/blue]

Calvin.gif
See Ya! . . . . . .
 
TheAceMan1: I'll experiment with that as well. I played around with putting a DateField.SetFocus command following the VBA which opens the Calendar form in Command Button event procedure. That worked as well. I'm always looking for ways to streamline code. Thanks for the quick response!
 
Jimb51,

You might also want to simplify your GUI by taking the command buttons off and placing their code in the DoubleClick property of the fields. Works like a charm!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top