withevents sometimes works sometimes no

A

asc4john

I have serveral forms that use the Xpdf viewer control, and them some
code in the VBA code, like so

Private withevents XView as Xpdfviewer.Xpdfviewer
Set Xview = Me!Xpdfviewer0.Object

Xview.loadFile "E:\test.pdf"

In form1 it works in form2 it doesn't work. In form4 it works in form3
it doesn't work. Same thing in different Access databases. If it
works great, if not there seems to be no way to make it work. It seems
to be a hit or miss weither the form will work or not. If I copy and
paste it may work or it may not work. What possible reasons are there
for the above not to work? Cause I can't think of anything else to
check. It seems to get a working form I need to build it two or three
times and pick the one that works and delete the other(s).
 

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