[ol]
[li]in the properties window, after you find the "After Insert" event, you have the option of changing its prameters.[/li]
[li]click on that event's field in the property box, and expand the pull-down menu.[/li]
[li]select "event procedure"[/li]
[li]a little button to the right of the field should be there.. click it[/li]
[/ol]
A code window should pop up where you can insert the code.
If I understand you clearly from your last post, you aren't sure about the correct syntax for the code?
if the StatusCodes drop-down menu already has a value and you want to check for if it is updated or not, here is one way I can think of:
it will take one global variable, and code in a few bits of code in various events. I'll past what I've come up with, but I haven't fully tested it yet...
Code:
Option Compare Database
'--- Step 1: define a variable for testing
' if the StatusCode was updated
Dim blnStatusCodeUpdated As Boolean
Private Sub Form_BeforeInsert(Cancel As Integer)
'--- Step 2: reset the variable before it is used.
blnStatusCodeUpdated = False
End Sub
Private Sub cboLTC_AfterUpdate()
'--- Step 3: set the variable to TRUE
' if the user updated the status code
blnStatusCodeUpdated = True
End Sub
Private Sub cboLTC_Exit(Cancel As Integer)
'--- Step 4a: if the user tabs to this field,
' but doesn't update it... warn him.
If Not blnStatusCodeUpdated Then
MsgBox "exit... PLEASE UPDATE STATUS CODE"
Me.cboLTC.SetFocus
End If
End Sub
Private Sub Form_AfterInsert()
'--- Step 4b: check and see if the status code was updated
' if the user continues to next record
If Not blnStatusCodeUpdated Then
MsgBox "afterinsert... PLEASE UPDATE STATUS CODE"
Me.cboLTC.SetFocus
End If
End Sub
all the sub procedure names (i.e. "Private Sub cboLTC_Exit(Cancel As Integer)"

are generated automatically by access when you add an event procedure to the form object, or one of its controls via the properties panel. So you don't have to copy all of my code, verbatim... just the innards to each of the procedure.
you can change the vairable names accordingly. Earnie Eng
If you are born once, you will die twice.
If you are born twice, you will die once