Howard Bash
asked on
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?
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
ASKER
Not really. I set the breakpoint and do not reach the line fo code. Also, I added the msgbox and it does not execute.
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)
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)
ASKER
The ellipsis takes me to the code. I am not aware of any other code running. I have not adjusted the trusts.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it. I had to enable the content...
(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.