Coba mas scriptnya ganti pake ini :

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
    If cmbjenis.Text = "TUNAI" Then
        If Format(txtgrandtotal, "#") > Format(txtbayar, "#") Then
            MsgBox "Jumlah bayar Lebih Kecil Dari Grand Total", vbInformation,
""
            Cancel = 1
        End If
    End If
End If
End Sub

Semoga membantu





yusup andrias <[EMAIL PROTECTED]> on 27/07/2006 02:35:39 PM

Please respond to [email protected]

To:   [email protected]
cc:    (bcc: Toni Rahayu/IT/domino_srv)

Subject:  [Programmer-VB] tany form_unload



hai rekan, i ada masalah neh
  Private Sub Form_Unload(Cancel As Integer)
  If cmbjenis.Text = "TUNAI" Then
        If Format(txtgrandtotal, "#") > Format(txtbayar, "#") Then
            MsgBox "Jumlah bayar Lebih Kecil Dari Grand Total", vbInformation,
""
            Exit Sub
        End If
    End If
unload me
  end sub

  nah kenapa jika saya masukkan nilai bayar lbh kecil dari totalharga form masih
tutup ya?

  ada yang bisa bantu ga neh?tolong ya..
  thx


---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2

Wahana Programmer Groups Links

<*> Untuk mengunjungi sponsor milis ini, klik link berikut:
    http://wahanaprogrammer.net

<*> Untuk menghubungi owner milis ini, kirim email ke:
    [EMAIL PROTECTED]

<*> Konsultasi pemrogramman bisa chat disini:
    Yahoo! Messenger: wahanaprogrammer
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-VB/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
ยข/min or less.




Toni Rahayu
PT. Omedata Electronics
IT Department
Hunting   : (62-22) 6030805 Ext 121
Faxs      : (62-22) 6030896
Homepage  : http://toni.rahayu.tripod.com




Kirim email ke