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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message Box Displays Twice

Status
Not open for further replies.

annie52

Technical User
Mar 13, 2009
164
0
0
US
I'm trying to prevent my users from changing a field on the record but my message box displays twice. Any thoughts?

Private Sub XrefGroupNum_Change()
On Error GoTo Err_XrefGroupNum_Change

MsgBox "Changes to the Tracking # must be" & vbCrLf _
& "accomplished from the Main Menu." & vbCrLf _
& "Please see your Team Leader for assistance.", vbOKOnly, _
"RPP Tracking System"
DoCmd.RunCommand acCmdUndo

Exit_XrefGroupNum_Change:
Exit Sub

Err_XrefGroupNum_Change:
pstrProcName = "XrefGroupNum_Change()"
pstrObjectName = "frmMilstripIssues"
Call RPPErrorHandler

End Sub
 
The On Change might not be appropriate since it fires with every key stroke that changes the value. Why not just lock and/or disable the control so users don't attempt to change the value?

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top