Message Box on Change ONly

  • Thread starter Thread starter Greta
  • Start date Start date
G

Greta

I have a message box that I need to pop up only when a
record is changed so I put this in:

Private Sub Manufacturer_Change()
MsgBox "Change Manufacturer"_
vbInformation,"Reminder"
End Sub

Right now the box pops up when the Manufacturer is changed
AND at the initial entry. I need it only to pop up when
the manuf is actually changed.
How do I do this?
 
I have a message box that I need to pop up only when a
record is changed so I put this in:

Private Sub Manufacturer_Change()
MsgBox "Change Manufacturer"_
vbInformation,"Reminder"
End Sub

Right now the box pops up when the Manufacturer is changed
AND at the initial entry. I need it only to pop up when
the manuf is actually changed.
How do I do this?

Use the AfterUpdate event rather than the Change event (which fires at
every keystroke).
 
Assuming that the Manufacturer is a mandatory item, you
could try refining the code as follows

If Manufacturer.OldValue <> "" Then
MsgBox "Change Manufacturer" , vbInformation, "Reminder"
End If

Hope This Helps
Gerald Stanley MCSD
 
Yeah!! Thanks, dude!
-----Original Message-----
Assuming that the Manufacturer is a mandatory item, you
could try refining the code as follows

If Manufacturer.OldValue <> "" Then
MsgBox "Change Manufacturer" , vbInformation, "Reminder"
End If

Hope This Helps
Gerald Stanley MCSD
.
 
Back
Top