help with code

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

Guest

Help, I got a code that is no longer supported in Access 2003. Here is the
code:
Private Sub ButnChangePrinter_Click()
Me!ocxChangePrinter.ShowPrinter
End Sub

The error is pointing to Me!ocxChangePrinter.ShowPrinter which says that
Object doesn't support this properties or methode. What do you use instead of
it? All it does is change the default printer in Access. Thank you for your
replies.
 
Mike said:
Help, I got a code that is no longer supported in Access 2003. Here is the
code:
Private Sub ButnChangePrinter_Click()
Me!ocxChangePrinter.ShowPrinter
End Sub

The error is pointing to Me!ocxChangePrinter.ShowPrinter which says that
Object doesn't support this properties or methode. What do you use instead of
it? All it does is change the default printer in Access. Thank you for your
replies.

You may have a registration problem or a references problem. First make sure
it is registered:

Start ... Run then type:

regsvr32.exe "The path to ocxChangePrinter"

Usually ActiveX controls are stored in the Windows\System32 directory. You
will get a message box stating that the registration succeeded. Once you're
sure it's registered properly, then check for references. It should be
checked in the references list (From any code window, look at Tools ...
References) and not marked "MISSING". Add it or browse to it.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Oh I see, so your saying that this is a file like a dll but a ocx file that
you have to register it. If it is, what is that file name I am looking for? I
looked in access itself and open up the Visual Basic Editor. Then looked in
Tools and Reference. I didn't see anything that is related to ChangePrinter.
If that file is missing from Windows\System32, where can I get it? Is that
part of the installation for Office 2003? Thankyou for your replies.
 
It appears to be a custom ActiveX control, judging by the control name on
your form or report. Whomever wrote the program you have, either built or
supplied that control, and you either need to find it on your old system and
copy it over to the new one, or contact the programmer for a copy.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Is there a current way to get that through access2003 because all it does is
bring up the printer setup window?
 

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

Back
Top