Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 627
  • Last Modified:

MS Access 2007 Breakpoint not hit

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
Howard Bash
Asked:
Howard Bash
  • 3
  • 3
1 Solution
 
peter57rCommented:
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
 
Howard BashSenior Software EngineerAuthor Commented:
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
 
peter57rCommented:
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
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
Howard BashSenior Software EngineerAuthor Commented:
The ellipsis takes me to the code.  I am not aware of any other code running.  I have not adjusted the trusts.
0
 
peter57rCommented:
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
 
Howard BashSenior Software EngineerAuthor Commented:
That was it.  I had to enable the content...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now