Switch Boards

G

Guest

Eliot,

I am currently working on creating a Switch Board, but have come across this
error message.

Basically I have created the Switch Board using Create Form in Design View.

I have then added a Command Button using the supplied wizard and asked it to
create a command to open another form. When you then click the command button
an error appears.

The code form the command is as follows:

Private Sub Command3_Click()
On Error GoTo Err_Command3_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "2 - Input Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command3_Click:
Exit Sub

Err_Command3_Click:
MsgBox Err.Description
Resume Exit_Command3_Click

End Sub

Has anyone ever come across this problem.
 
G

Guest

It seems like the name of the form is the problem here. Try placing brackets
around them and then try it again...

stDocName = "[2 - Input Form]"

Maurice
 

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