A very simple question

mkkashif

Registered User.
Local time
Yesterday, 19:18
Joined
Sep 1, 2004
Messages
88
i only want if first condition meet then stop the user at that point not go further postion.
not check other condition .
what i have write with first endif.
code
If IsNull(Me.total) Then
MsgBox "You Can Not Enter Bill Without Any Products", vbInformation
End If

If Me.text.Value = "Sale" Then

If MsgBox("You Are Going to Update All Things Cofirm to Yes or No to Return", vbQuestion + vbYesNo, "Save Record?") = vbYes Then
DoCmd.OpenQuery "insertdaybook"
DoCmd.OpenQuery "insertstock"
DoCmd.OpenQuery "updatestock"
End If
'donothing
End If
 
:p Hello Mkkashif!
Before the first "End If" write Exit Sub
 
Code:
If IsNull(Me.total) Then
    MsgBox "You Can Not Enter Bill Without Any Products", vbInformation
Else
    If Me.text.Value = "Sale" Then
        If MsgBox("You Are Going to Update All Things Cofirm to Yes or No to   Return", vbQuestion + vbYesNo, "Save Record?") = vbYes Then
           DoCmd.OpenQuery "insertdaybook"
           DoCmd.OpenQuery "insertstock"
           DoCmd.OpenQuery "updatestock"
        End If
    End if     
End If


???
kh
 

Users who are viewing this thread

Back
Top Bottom