Pak Nadhif, ini jawabannya :
Private Sub password_AfterUpdate()
If password = "1" Then
DoCmd.OpenForm "kuning"
ElseIf password = "2" Then
DoCmd.OpenForm "Hijau"
Else
DoCmd.Close
End If
End Sub
nadhif_fakhri <[email protected]>
Sent by: [email protected]
05/28/2009 02:16 PM
Please respond to belajar-access
To: [email protected]
cc:
Subject: [belajar-access] fungsi if.....? [1 Attachment]
[Attachment(s) from nadhif_fakhri included below]
Siang semua,
saya mau nanya nih...
saya sedang bikin program access sederhana menggunakan if
saya isi code nya seperti ini :
Private Sub password_AfterUpdate()
If password = "1" Then
DoCmd.OpenForm "kuning"
Else
DoCmd.Close
End If
End Sub
saya maunya bisa membuka form lain, misalkan :
saya tambahin if lagi
Private Sub password_AfterUpdate()
If password = "1" Then
DoCmd.OpenForm "kuning"
If password = "2" Then
DoCmd.OpenForm "Hijau"
Else
DoCmd.Close
End If
End Sub
kok gak bisa ya ....
file nya saya lampirkan ...
Terima kasih
Best regards,
nadhif_fakhri
mailto:[email protected]
===========================================================================
This email is confidential. If you are not the addressee tell the sender
immediately and destroy this email without using, sending or storing it.
Emails are not secure and may suffer errors, viruses, delay, interception
and amendment. The Trakindo Group of Companies do not accept liability for
damage caused by this email and may monitor email traffic.
Unless expressly stated, any opinions are the sender's and are not approved
by the Tiara Marga Trakindo Group of Companies and this email is not an
offer, solicitation, recommendation or agreement of any kind.
===========================================================================