dear all, 

ass. mas dayat koq ak coba codingnya tp gak jalan bisa diliat gak 
kslhannya ada dimn? ini ak kasih coding yg ak buat untuk formulasi 
brngkli aja mas dayat bisa mnambahkan klo ada yg kurang.


Sub AppendRecord1()

    Dim tbl             As Table
    Dim cat             As New ADOX.Catalog
    Dim cn              As New ADODB.Connection
    Dim rec             As New ADODB.Recordset
    Dim fld             As ADODB.Field
    Dim recNew          As New ADODB.Recordset
    Dim nilai1          As ADODB.Recordset
    Dim nilai2          As ADODB.Recordset
    Dim hasil           As ADODB.Recordset
    Dim file_path       As String
    Dim strSQL          As String
    Dim intcnt          As Long
    
   
    cat.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                            "Data Source=" & App.Path & "\Master.MDB"
    
    cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security 
Info=False;Data Source=" & App.Path & "\master.mdb"
    
    rec.Open "SELECT RACH Succ Rate.AnalysisEricsson as nilai1, SD 
Cong.AbsoluteEricsson as nilai2, RACH Succ Rate.AnalysisEricsson + 
SD Cong.AbsoluteEricsson as hasil"
              "FROM AnalysisEricsson JOIN AbsoluteEricsson ON 
a.id=b.id", cn, adOpenKeyset
    tbl.Name = "FileProcess"
    For Each fld In rec.Fields
        tbl.Columns.Append fld.Name, adChar, 200
    Next
    recNew.Open "FileProcess", cat.ActiveConnection, adOpenKeyset, 
adLockOptimistic
    Screen.MousePointer = vbHourglass
    ProgressBar1.Visible = False
    If rec.RecordCount <> 0 Then
        ProgressBar1.Max = rec.RecordCount
    End If
    intcnt = 1
    Do Until rec.EOF
    DoEvents
        With recNew
             .AddNew
             .Fields("File_Date") = dtp1.Value
            For Each fld In rec.Fields
             .Fields(fld.Name) = IIf(IsNull(rec(fld.Name)), "", rec
(fld.Name))
             .Fields("Dir_File") = Text1.Text
        Next
        End With
        ProgressBar1.Value = intcnt
        intcnt = intcnt + 1
        rec.MoveNext
    Loop
        DoEvents
    Exit Sub
errHandler:
If Err.Number = -2147467259 Then
MsgBox "File is not created!", 0, "Attention!"
End If
End Sub


thanks

adie putra

--- In [email protected], dayat <[EMAIL PROTECTED]> wrote:
>
> pake JOIN di SQL. Contohnya:
> 
> SELECT a.data as nilai1, b.data as nilai2, a.data+b.data as hasil
> FROM table1 a JOIN table2 b ON a.id=b.id;
> 
> Klo sudah mengerti contoh diatas, pasti untuk perhitungan lainnya 
menjadi
> mudah. semoga membantu.
> 
> salam
> --
> dayat
> 
> On 6/23/06, adie putra <[EMAIL PROTECTED]> wrote:
> >
> > Ass. slmt pagi semuanya.
> >
> > Sorry yah ak mo tanya lg nih tentang formula di access, gmn sih 
caranya
> > klo buat formula perkalian dan akumulasi penjumlahan field ke 
samping tapi
> > beda table di access untuk fungsinya sih sama seperti formula di 
excel. atas
> > perhatian dan bantuannya saya ucapkan trima kasih.
> >
> > adie putra
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/k7folB/TM
--------------------------------------------------------------------~-> 

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/
 


Kirim email ke