Access 2007 Command Button no working

  • Thread starter Thread starter kimberlytenay
  • Start date Start date
K

kimberlytenay

Hi,

The following code for my "OK" command button, use to work in access
2000 but is not working in access 2007.

Private Sub Command13_Click()
On Error GoTo Err_Command13_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Data Input Form"
DoCmd.OpenForm stDocName, , , stLinkCriteria


Exit_Command13_Click:
Exit Sub

Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click

End Sub

When I click this button it is suppose to return a "data input" form,
but nothing happens when I click this button. I get no error or
anything. Everything else on the form (combo boxes) works, just the
command buttons do not.
 
Is this an Access 2000 app that you're now running in AC 2007 or have you
copied and pasted the code from one into the other?
 
Perhaps the code is disabled for security reasons.

In Access 2007, click:
Office Button
Access Options
Trust Center
Trust Center Settings
Trusted Locations
Add new location
and add the folder where you keep your databases.
 
Perhaps the code is disabled for security reasons.

InAccess2007, click:
Office Button
AccessOptions
Trust Center
Trust Center Settings
Trusted Locations
Add new location
and add the folder where you keep your databases.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips forAccessusers -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.














- Show quoted text -

Allen,

Thanks, that was what it was. I added my application folder as a
trusted location. It works fine now.

Thanks again.

Kim
 
Back
Top