Advertisement

02.17.2008 at 03:11PM PST, ID: 23170159
[x]
Attachment Details

Access 2007 Executing Visual Basic Editor Code

Asked by cnw2908 in Access Coding/Macros, Access Forms

Tags:

I am working in Access 2007 and am trying to write an event procedure but my code doesn't execute.  For exmaple, I wrote some test code for to execute upon the form loading, i.e., "Private Sub Form_Load()", and within several combo box events such as "_Change()", "_Click()", "_GotFocus()", and "_LostFocus()" events, but the code never executes.  I have created a modular scoped integer, "iTest" and just increment the set it to 0 when the form loads and incremnts it by 1 when other events are triggered.  I have placed breakpoints at each function in my code but they are never reached.  What do I need to do?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
Option Compare Database
Option Explicit
 
Dim iTest As Integer
 
Private Sub cboPlayer_AfterUpdate()
    cboPlayer_Click
End Sub
 
Private Sub cboPlayer_Change()
    iTest = iTest + 1
End Sub
 
Private Sub cboPlayer_Click()
    iTest = iTest + 1
End Sub
 
Private Sub cboPlayer_GotFocus()
    iTest = iTest + 1
End Sub
 
Private Sub cboPlayer_LostFocus()
    iTest = iTest + 1
End Sub
 
Private Sub Form_Load()
    iTest = 0
End Sub
[+][-]02.17.2008 at 04:07PM PST, ID: 20916533

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 04:17PM PST, ID: 20916578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 04:21PM PST, ID: 20916603

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Access Forms
Tags: Microsoft Access 2007 - Visual Basic Editor
Sign Up Now!
Solution Provided By: mbizup
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.17.2008 at 04:58PM PST, ID: 20916785

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628