ajames420
08-27-2007, 01:33 PM
I put in what I thought was a quick fix for a message box to appear if the user only enters a Actual Fine and does not define the type of fine.
The message box works fine but it if pops up then you enter the fine and hit add record it does nothing. Help please!!!
Code:
Dim Msg, Style, Title, Response
If Missort_Fine = 0 And Dup_ID = 0 And Paid_Early = 0 _
& Priority = 0 And COD = 0 And Pkg_Type = 0 And Unmanifested = 0 Then
Msg = "You must have at least one field with a fine amount!" ' Define message.
Style = vbOK + vbCritical ' Define buttons.
Title = "Postal Fine Entry" ' Define title.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbOK Then ' User chose Yes.
DoCmd.CancelEvent
Missort_Fine.SetFocus ' Perform some action.
Else
DoCmd.GoToRecord , , acNewRec
HubID.SetFocus
End If
End If
Edited 28-Aug-07 by geekgirlau. Reason: insert vba tags
The message box works fine but it if pops up then you enter the fine and hit add record it does nothing. Help please!!!
Code:
Dim Msg, Style, Title, Response
If Missort_Fine = 0 And Dup_ID = 0 And Paid_Early = 0 _
& Priority = 0 And COD = 0 And Pkg_Type = 0 And Unmanifested = 0 Then
Msg = "You must have at least one field with a fine amount!" ' Define message.
Style = vbOK + vbCritical ' Define buttons.
Title = "Postal Fine Entry" ' Define title.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbOK Then ' User chose Yes.
DoCmd.CancelEvent
Missort_Fine.SetFocus ' Perform some action.
Else
DoCmd.GoToRecord , , acNewRec
HubID.SetFocus
End If
End If
Edited 28-Aug-07 by geekgirlau. Reason: insert vba tags