Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Button on Switchboard

Status
Not open for further replies.

BLutgen

Technical User
May 25, 2001
47
US
I have a main switchboard that autoexecs. One of my command buttons on the switchboard is not working and I cannot get it working for the life of me. I just want it to open up another form. The form I am opening is "Old Quote" and the name of the Button is [OldQuote]
The code that I have now is as follows....I just got it from the command button wizzard:
Private Sub OldQuote_Click()
On Error GoTo Err_Old Quote_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName="Old Quote"
DoCmd.OpenForm st DocName,,,stLinkCriteria

Exit_OldQuote_Click:
Exit Sub

Err_OldQuote_Click:
MsgBox Err.Description
Resume Exit_OldQuote_Click

End Sub

When I try to run the button I get that the On Click produced following error: Ambiguous name detected: Old_Quote_Click.

What am I doing wrong? Thanks.

Brad


 
You have a space in the second line of your code that could be causing your problem. See below:

You have this:
On Error GoTo Err_Old Quote_Click

Change it to this:
On Error GoTo Err_OldQuote_Click

HTH Joe Miller
joe.miller@flotech.net
 
Thanks a lot for the help. For some reason all 3 of my command buttons on the form were giving me the same message. I ended up just redoing the switchboard since it was just a simple design. Thanks though!

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top