Open Form button not working

skwilliams

Registered User.
Local time
Today, 13:19
Joined
Jan 18, 2002
Messages
516
I have a menu that opens when a username and password is entered. The buttons work correctly on this menu except for one. It does nothing. If I use the shift bypass and go to the menu then click the button it works fine. Here's the on_click procedure.

Code:
Private Sub Command67_Click()
On Error GoTo Err_Command67_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "frmMain"
    DoCmd.OpenForm stDocName, acNormal

Exit_Command67_Click:
    Exit Sub

Err_Command67_Click:
    MsgBox Err.Description
    Resume Exit_Command67_Click
 
Did you rename the button and forget to move the code to the correct name? It shows Command67 but if you renamed the button, the code does not change with it once it has been added before the name change.
 
The button is named Command67.
 
The form that this button is supposed to open is an unbound form with four tabs and open form buttons on each of those tabs. I don't know if this matters or not.
 
The button is named Command67.

Go to the button properties dialog and check to make sure that [Event Procedure] is in the click event and hasn't somehow been removed. That happens frequently to people.
 
So have you set a breakpoint to see if the event really runs when the button is clicked?

Second, sometimes things corrupt, so maybe you should delete that button and try adding a new one.
 
I set a breakpoint and nothing happened. I've also tried deleting and re-creating the button with no luck.
 
I set a breakpoint and nothing happened. I've also tried deleting and re-creating the button with no luck.

Can you post a copy of the database, perhaps without any data, so I can take a look?
 
Weird thing is the button works fine if I use it going through the shift bypass. It's just when someone logs on with a username and password that it stops working.
 
Do you have anything set for permissions? I don't know. So, is this a secured mdb with mdw file?
 
I bypassed the main menu and it's working now. Very weird.

Thanks for all your help!!
 
If I use the shift bypass and go to the menu then click the button it works fine.

I know that if you change the options of the DB for other users, for example, they can't open a certain form, when you press shift and open the DB, it opens it in the full way...
 

Users who are viewing this thread

Back
Top Bottom