Win2K vs XP problem

  • Thread starter shelly2 via AccessMonster.com
  • Start date
S

shelly2 via AccessMonster.com

I've got an Access 2003 database that is used on both a 2K Pro machine and an
XP Pro machine. Everything was fine until I tried to call a public sub in
one form from another form. It works fine on the 2K machine, but gives me a
Runtime 459 error ("object or class does not support the set of events") on
the XP. It breaks on the line I've highlighted with asterisks below.

This is the code I use to call the sub, located in a form called "Punch":
*~*~*~*~*~*~*~*~*~*
DoCmd.OpenForm "Allocate Form"
***Forms![Allocate Form].PopulateInit (init)***
*~*~*~*~*~**~*~*~*~*

This is the sub on the Allocate Form:
*~*~*~*~*~*~*~*~*~*~*
Public Sub PopulateInit(init)

Dim t As Single

Me.Text4.SetFocus
Me.Text4.Text = Date
Me.MasterInit.SetFocus
Me.MasterInit.Text = init

Calendar3.Value = Date

Me.txtTotalTime.SetFocus
t = Me.txtTotalTime.Value

Me.Allocate_Subform.SetFocus
DoCmd.GoToRecord , , acFirst
x = Me.Allocate_Subform.Form.amounttime.Value
If x = 0 Then
Me.Allocate_Subform.Form.amounttime.Value = t
Me.Refresh
Else: Exit Sub
End If

End Sub
*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

Thanks in advance for your assistance!
 
S

Stefan Hoffmann

hi Shelly,
I've got an Access 2003 database that is used on both a 2K Pro machine and an
XP Pro machine. Everything was fine until I tried to call a public sub in
one form from another form. It works fine on the 2K machine, but gives me a
Runtime 459 error ("object or class does not support the set of events") on
the XP.
If i may guess:
Calendar3.Value = Date
Is this a Common Control? Have you installed the same version on the XP
machine?


mfG
--> stefan <--
 
S

shelly2 via AccessMonster.com

Thanks, Stefan. It is installed on the XP machine, and works great when I
don't try to call this silly subroutine.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top