command button will not open form

G

George Wilson

I am assisting a customer using Access 2003. She created a command that
prompts the individual for site information and then opens a form. It works
fine on her system. She has copies of the database she has given to others
and the control promts for the site info but never opens the form. Is there
an active X control or a DLL that may need to be registered for this control
to work properly on other computers?
George
 
J

Jeff Boyce

George

What's the code behind that button?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
D

Daniel Pineault

Highly doubtful this has anything to do with ActiveX, DLLs,....

Do you get an error?
Can you post the command button code here so we can troubleshoot it?
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
G

George Wilson

She does not get an error but the form never shows up. The code is as follows:

Private Sub Command46_Click()
On Error GoTo Err_Command46_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Employer Code to Billing Site"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command46_Click:
Exit Sub

Err_Command46_Click:
MsgBox Err.Description
Resume Exit_Command46_Click

End Sub

Thank you for you assistance
George
 
D

Daniel Pineault

I don't see any problem with the code. I would try it in the Immediate window

? DoCmd.OpenForm "Employer Code to Billing Site", , , stLinkCriteria

What happens? Does it open?

Also, you mention 'prompts the individual for site information and then
opens a form', where is the user prompt code? How does it interact/combine
with the code you have posted?
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

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