Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 632
  • 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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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