Solved

MS Access 2007 Breakpoint not hit

Posted on 2009-06-30
6
623 Views
Last Modified: 2013-11-28
This must be the simplest of questions, but here goes.

I have an access form with a combo box and a text box.  In the combo box afterupdate I have a piece of code with a breakpoint.

I change the contents of the combo box but never hit the breakpoint.

What am I missing here?

Private Sub clbNames_AfterUpdate()
    DoCmd.ShowAllRecords
    
    Me!txtMachineName.SetFocus
    DoCmd.FindRecord Me!clbNames
    
    'Set value of combo box equal to an empty string
    Me!clbNames.Value = ""
    
 
End Sub

Open in new window

0
Comment
Question by:Howard Bash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 24746902
Are you sure the code is executing?

(If you'r not sure add a
 msgbox "Here I am!"
command into the code.

If you are sure it is running then look at the 'Use Access Special Keys' setting in Access Options.
If you have unchecked this breakpoints don't work.
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 24747097
Not really.  I set the breakpoint and do not reach the line fo code.  Also,  I added the msgbox and it does not execute.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 24747150
SO the code is not running then.

You need to check the properties of the combobox and make sure that (a) the Afterupdate property shows as Event Procedure and (b) if you click the build button (...) to the right you are taken to the correct code procedure.

Do you know whether ANY code is running?
(Are you using a trusted location or have to set the correct security options)
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 1

Author Comment

by:Howard Bash
ID: 24747233
The ellipsis takes me to the code.  I am not aware of any other code running.  I have not adjusted the trusts.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24747272
When you open the database, if you have not placed the file in a trusted location, you will get a security message just below the ribbon. You have to deal with it there.
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 24747320
That was it.  I had to enable the content...
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question