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

LVL 1
Howard BashSenior Software EngineerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
peter57rConnect With a Mentor Commented:
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
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
 
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
 
Howard BashSenior Software EngineerAuthor Commented:
That was it.  I had to enable the content...
0
All Courses

From novice to tech pro — start learning today.