Solved

MS Access 2007 Breakpoint not hit

Posted on 2009-06-30
6
616 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:hbash
  • 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:hbash
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 1

Author Comment

by:hbash
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:hbash
ID: 24747320
That was it.  I had to enable the content...
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now