R
RobGMiller
Windows Server 2003 running full Access 2003. SP3 with all the latest Office
updates.
There is a bunch of vba code in a Calendar form that we've used for years.
This Calendar form is handy because it doesn't required a Reference to an
external library. It's not an Active X Control its simly a form with simple
access controls on it. It has worked well until I tried to use it in an MDE
on a Windows 2003 Server accessed from terminal services.
The odd thing is that the exact same Calendar form with the same code works
from one MDE but not another on the same server. It works in an MDB and on
all other systems that its been used on for 10 years.
The full error it generates when a day lable is clicked is: The expression
On Click you entered as the event property setting produced the following
error: The function you entered can't be used in this expression.
The on click event reads as follows: =HandleSelected("lbl25").
The HandleSelected function calls HandleIndent strName and hides the form
(CloseForm HideIt:=True)
The HandleIndent function sets Me(lable_control_name).SpecialEffect =
acSunken and assigns a global variable the value of the caption of the lable
that was clicked as in: (Me!Day = Me(lable_control_name).Caption)
When the form, which is a dialog, is closed(Hiden) the next line gets its
value and places it in a Date text box control.
The error occurs at the time the day lable is clicked. A message box at the
start of HandleSelected function is never reached.
The "=HandleSelected("lbl25")" was change to an [Event Procedure] to call
the function from within the OnClick event. This did not help.
Any thoughts would be greatly appreciated.
updates.
There is a bunch of vba code in a Calendar form that we've used for years.
This Calendar form is handy because it doesn't required a Reference to an
external library. It's not an Active X Control its simly a form with simple
access controls on it. It has worked well until I tried to use it in an MDE
on a Windows 2003 Server accessed from terminal services.
The odd thing is that the exact same Calendar form with the same code works
from one MDE but not another on the same server. It works in an MDB and on
all other systems that its been used on for 10 years.
The full error it generates when a day lable is clicked is: The expression
On Click you entered as the event property setting produced the following
error: The function you entered can't be used in this expression.
The on click event reads as follows: =HandleSelected("lbl25").
The HandleSelected function calls HandleIndent strName and hides the form
(CloseForm HideIt:=True)
The HandleIndent function sets Me(lable_control_name).SpecialEffect =
acSunken and assigns a global variable the value of the caption of the lable
that was clicked as in: (Me!Day = Me(lable_control_name).Caption)
When the form, which is a dialog, is closed(Hiden) the next line gets its
value and places it in a Date text box control.
The error occurs at the time the day lable is clicked. A message box at the
start of HandleSelected function is never reached.
The "=HandleSelected("lbl25")" was change to an [Event Procedure] to call
the function from within the OnClick event. This did not help.
Any thoughts would be greatly appreciated.