Opening Calendar Form From Sub Form Problem

RobAccess

New member
Local time
Today, 00:54
Joined
Mar 14, 2002
Messages
7
I'm using a calender form which came with an Access 2000 Programming book. The calendar is opened using the following code:

DoCmd.OpenForm "ezz_PopUpCalendar",acnormal,,,,acDialog,Me.Name & ".[DateField]"
Me!DateField.SetFocus

The idea being that when the calendar form opens the name of the form you are recording the date on, "Me.Name" and the field on this form [DateField] are passed to the calender form so it can pass back the date selected by the user.

My problem is that the above does not work when the "Me.Name" argument is a subform. It errors as the "Me.Name" cannot be found.

Does any one know what "Me.Name" should be replaced by?

Any help much appreciated.
 

Users who are viewing this thread

Back
Top Bottom