Subforms and OLE Server/Event Procedure problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

Im sure for most of the learned in this forum this will be a straightforward problem to solve, but it has me
scratching my head to the point where it is red raw :). I have a subform placed on a standard form in order to show all valuations for a given asset and two of its members have Event procedures associated with them - PlantNum_LostFocus and chkOverride_Click

The latter is straightforward enough - when a user clicks the Override checkbox it is supposed to determine
the current value of itself and toggling it, also recalculating the asset's 'fair value' if the checkbox is now cleared.
Here is this item's code:
(chkFVOverride_Click):

If (setMembers(Me.PlantNum.Value)) Then
If (Me.chkFVOverride.Value = False) Then
Me.chkFVOverride.Value = True
Else
Me.chkFVOverride.Value = False
Me.FV.Value = calcFV(intERL, intTUL, dblInst, dblRepl)
End If
Else
'failure setting members
MsgBox "Could not set Valuation Subform members, exiting..", vbCritical, constVERSION
End If


PlantNum_LostFocus has similar code (not included for brevity). Now my problem is that when either code
chunk is scheduled to run, the following error is returned:

'The expression _OnClick / LostFocus_ you entered as the event property setting produced the following
'error: A problem occurred while <name suppressed> System was communicating with the OLE Server
'or ActiveX control

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event
Procedure]
*There may be an error evaluating the function, event or macro

Now I realise the wise heads out there will be saying 'look at the help', but such a repository has provided
me with no joy - any ideas? I can include the code for setMembers if needed (ran out of space here)

Chops
 
Hi all,

Thankyou for the huge response :), I did manage to fix the problem myself. If anyone is interested in the
process, please repost to this msg group

Chops

----- shane (Chops) wrote: -----

Hi all,

Im sure for most of the learned in this forum this will be a straightforward problem to solve, but it has me
scratching my head to the point where it is red raw :). I have a subform placed on a standard form in order to show all valuations for a given asset and two of its members have Event procedures associated with them - PlantNum_LostFocus and chkOverride_Click

The latter is straightforward enough - when a user clicks the Override checkbox it is supposed to determine
the current value of itself and toggling it, also recalculating the asset's 'fair value' if the checkbox is now cleared.
Here is this item's code:
(chkFVOverride_Click):

If (setMembers(Me.PlantNum.Value)) Then
If (Me.chkFVOverride.Value = False) Then
Me.chkFVOverride.Value = True
Else
Me.chkFVOverride.Value = False
Me.FV.Value = calcFV(intERL, intTUL, dblInst, dblRepl)
End If
Else
'failure setting members
MsgBox "Could not set Valuation Subform members, exiting..", vbCritical, constVERSION
End If


PlantNum_LostFocus has similar code (not included for brevity). Now my problem is that when either code
chunk is scheduled to run, the following error is returned:

'The expression _OnClick / LostFocus_ you entered as the event property setting produced the following
'error: A problem occurred while <name suppressed> System was communicating with the OLE Server
'or ActiveX control

*The expression may not result in the name of a macro, the name of a user-defined function, or [Event
Procedure]
*There may be an error evaluating the function, event or macro

Now I realise the wise heads out there will be saying 'look at the help', but such a repository has provided
me with no joy - any ideas? I can include the code for setMembers if needed (ran out of space here)

Chops
 
Back
Top