Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form afterupdate - how does it work? 1

Status
Not open for further replies.

jmstarbuck

Programmer
Aug 11, 2003
90
US
HI all,

I want to popup a message box anytime a field is edited on a form after that record has already been reported (I know this from looking at another field on the form). I'm trying to use the Form's AfterUpdate event but it doesn't fire on every field, so I am confused.

Here's what I have:
Code:
Private Sub Form_AfterUpdate()
If Me.CDAReportStatus = "A" Then
    MsgBox "This job has already been reported ...."
End If
End Sub
I don't want to block the edit and I would surely like to avoid linking code to every field's afterupdate event.

Does anyone have a recommendation?

Janice
 
You can write one function like:
Code:
Public Function CheckReportStatus()
   If Me.CDAReportStatus = "A" Then
     MsgBox "This job has already been reported ...."
   End If
End Function
Then select every appropriate bound text box and set the After Update event to:
[tt] =CheckReportStatus()[/tt]



Duane
Hook'D on Access
MS Access MVP
 
Thanks so much. I was afraid that was going to be the answer.

I think I may be too lazy for this job. ;)

Janice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top