boleh ikutan ya............. kalo yg di bandingkan adalah angka...... kenapa tdk memcoba untuk mempergunakan teknik sort, spt bubble sort , quick sort dll
Bubble Sort http://www.cs.princeton.edu/~ah/alg_anim/version2/BubbleSort.html quick sort http://www.cs.princeton.edu/~ah/alg_anim/version2/QuickSort.html Best regard Erwin Sugiawan ----- Original Message ---- From: sukarno <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, November 6, 2007 8:50:52 AM Subject: Re: [belajar-access] Bagaimana membandingkan 3 field ??? dan disimpan pada 1 field?? Untuk yang begini terus terang belum pernah coba, Untuk yang saya ganti merah bener ga ya? salam, sukarno ----- Original Message ----- From: ara Firmansyah To: [email protected] Sent: Tuesday, November 06, 2007 8:16 AM Subject: Re: [belajar-access] Bagaimana membandingkan 3 field ??? dan disimpan pada 1 field?? Mas Sukarno, minta tolong lagi nich..! Maaf sebelumnya! Sy mencoba menerapkan logika tersebut di form dengan code sbb : Private Sub HitungHargaPas( ) On Error Resume Next Dim hRef1x As Double, hRef2x As Double, hRef3x As Double Dim hargamax As Double Dim h1 As Double, h2 As Double, h3 As Double Dim xharga_pas As Double hRef1x = Me!hRef1 hRef2x = Me!hRef2 hRef3x = Me!hRef3 If (hRef1x > hRef2x And hRef1x > hRef3x) Then hargamax = hRef1x If (hRef2x > hRef1x And hRef2x > hRef3x) Then hargamax = hRef2x If (hRef3x > hRef1x And hRef3x > hRef2x) Then hargamax = hRef3x End If End If End If If hRef1x = 0 Then h1 = hargamax Else h1 = hRef1x End If If hRef2x = 0 Then h2 = hargamax Else h2 = hRef2x End If If hRef3x = 0 Then h3 = hargamax Else h3 = hRef3x End If If (h1 < h2 And h1 < h3) Then xhHPS = h1 If (h2 < h1 And h2 < h3) Then xhHPS = h2 If (h3 < h1 And h3 < h2) Then xhHPS = h3 End If End If End If xharga_pas = Me!harga_pas End Sub Private Sub hHPS_AfterUpdate( ) Call HitungHargaPas End Sub Private Sub hRef2_AfterUpdate( ) Call HitungHargaPas End Sub Private Sub hRef3_AfterUpdate( ) Call HitungHargaPas End Sub Tapi engga jalan mohon bantuannya ! mungkin sy salah!!! terima kasih sebelumnya!! ----- Original Message ---- From: sukarno <designj-sik@ gr.sei.co. jp> To: belajar-access@ yahoogroups. com Sent: Thursday, November 1, 2007 4:05:00 PM Subject: Re: [belajar-access] Bagaimana membandingkan 3 field ??? dan disimpan pada 1 field?? maaf, revisi lihat di atachment aja pak. ----- Original Message ----- From: sukarno To: belajar-access@ yahoogroups. com Sent: Thursday, November 01, 2007 3:07 PM Subject: Re: [belajar-access] Bagaimana membandingkan 3 field ??? dan disimpan pada 1 field?? di Query mungkin bisa dicoba begini Pak, hargapass: IIf([harga1]<[harga2] And [harga1]<[harga3],[harga1] ,IIf([harga2]<[harga1] And [harga2]<[harga3],[harga2] ,IIf([harga3]<[harga1] And [harga3]<[harga2],[harga3] ))) salam, sukarno ----- Original Message ----- From: ara Firmansyah To: belajar-access@ yahoogroups. com Sent: Thursday, November 01, 2007 2:02 PM Subject: [belajar-access] Bagaimana membandingkan 3 field ??? dan disimpan pada 1 field?? Asslamualaikum Wr.Wb. Mohon pencerahannya pada suhu Access!! Bagaimana membanding mana yang paling kecil nilainya tetapi bukan nol dari 3 field, dan di simpan di 1 field???? Misal : Sy punya tabel subBarang dengan field kodebrg, nama_brg, vol, harga1, harga2, harga3, harga_pas Bagaimana membandingkan mana yang paling kecil (tetapi bukan nol) antara harga1, harga2, harga3 dan di simpan di harga_pas. Sebelumnya saya ucapakan terima kasih, mohon maaf bila pertanyaannya membingungkan. Sekali lagi mohon maaf!! Wassalam , Ara ____________ _________ _________ _________ _________ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail. yahoo.com ____________ _________ _________ _________ _________ __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail. yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

