A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access 2007 Command Button no working



 
 
Thread Tools Display Modes
  #1  
Old March 8th, 2007, 10:51 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 5
Default Access 2007 Command Button no working

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.

  #3  
Old March 9th, 2007, 02:02 AM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default Access 2007 Command Button no working

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.

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

wrote in message
oups.com...
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.

  #4  
Old March 9th, 2007, 03:13 PM posted to microsoft.public.access.forms
[email protected]
external usenet poster
 
Posts: 5
Default Access 2007 Command Button no working

On Mar 8, 9:02 pm, "Allen Browne" wrote:
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.

wrote in message

oups.com...



Hi,


The following code for my "OK" command button, use to work inaccess
2000 but is not working inaccess2007.


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.- Hide quoted text -


- 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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.