OLE Server error

J

Jason

Just got a new computer - running MS Access 2002 (I'm wondering if maybe I
need to activate some reference libraries?)

I have the following code on the dbl click event of a list box:

Private Sub lstSOP_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String
Dim Criteria As String
Dim i As Variant


' Build criteria string from selected items in list box.
Criteria = ""
For Each i In Me![lstSOP].ItemsSelected
If Criteria <> "" Then
Criteria = Criteria & " OR "
End If
Criteria = Criteria & "[SOP]=" & Me![lstVisits].ItemData(i)
Next i

stDocName = "frmTest"

stLinkCriteria = Criteria
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub


When I double click, I get the following error:

The expression On Dbl Click you entered as the event property setting
produced the following error: A problem occurred while Microsoft Access 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 have been an error evaluating the function, event, or macro.

Any help you can provide is appreciated!
 
C

Charles Wang [MSFT]

Hi Jason,
Could you please further check where the error was thrown by using breakpoint
debugging? Was it at DoCmd.OpenForm?

If so, I think that this issue should be caused by the form which name was the value of
stDocName. You may further check and elaborate what the form did when it was loaded.

If it is convenient for you, you may also mail me (changliw_at_microsoft_dot_com) your
access file for more effective research.

If you have any other questions or concerns, please feel free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: (e-mail address removed).
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 
J

Jason

Thanks Charles - I'm not sure how to use breakpoint debugging though to
troubleshoot the problem? Do you have some tips for me on that?
 
J

Jason

OK - I got it to work somehow. I just recreated the form and everything
worked fine...

--
Thanks,

Jason


Jason said:
Thanks Charles - I'm not sure how to use breakpoint debugging though to
troubleshoot the problem? Do you have some tips for me on that?
--
Thanks,

Jason


"Charles Wang [MSFT]" said:
Hi Jason,
Could you please further check where the error was thrown by using breakpoint
debugging? Was it at DoCmd.OpenForm?

If so, I think that this issue should be caused by the form which name was the value of
stDocName. You may further check and elaborate what the form did when it was loaded.

If it is convenient for you, you may also mail me (changliw_at_microsoft_dot_com) your
access file for more effective research.

If you have any other questions or concerns, please feel free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: (e-mail address removed).
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
=========================================================
 

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