BeforeUpdate Event

15 May

From:    “Sofyan Efendi” <sofyan@madinah.cc>
Date:    Wed, 16 Aug 2006 08:18:48 +0700

Event BeforeUpdate terjadi sebelum perubahaan data di dalam suatu control atau record terupdate. Syntax:

Private Sub object_BeforeUpdate (Cancel As Integer)

Penjelasan:

– Object: Nama form atau control.

– Cancel: Jika diset menjadi True (-1), maka akan meng-cancel event BeforeUpdate.

Contoh:

Private Sub ProductName_ BeforeUpdate( Cancel As Integer)
If(Not IsNull(DLookup( “[ProductName] “, _
“Products”, “[ProductName] ='” _
& Me!ProductName & “‘”))) Then
MsgBox “Product has already been entered in the database.”
Cancel = True
Me!ProductName. Undo
End If
End Sub

Wassalaamu’alaikum Warahmatullahi Wabarakatuh,
Sofyan Efendi
– AccessWeb <http://www35.websamba.com/accessweb&gt;
– OPI-Homepage <http://www.geocities.com/opi1978&gt;

2 Responses to “BeforeUpdate Event”

  1. boypeace February 23, 2010 at 6:48 am #

    Saran, setiap tutor diberikan sample, file untuk download

    • Admin February 23, 2010 at 8:37 am #

      terima kasih usulannya mas
      akan saya coba usakan🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: