teman 2 minta tolong,
   
  Saya mau isi pesan pada text2.text, jika belum diisi maka keluar pesan data  
staff belum diisi dan text7.text jika kosong, maka keluar pesan data guest 
belum diisi, tolong diisi.
  Jika kolom tsb belum diisi, maka data tidak bisa disimpan dan jika data sudah 
diisi, maka data dilajutkan untuk disimpan
  Tolong dimana diisi commad tsb
  Berikut scriptnya:
   
  Private Sub Simpan()
On Error GoTo iniEror
    Dim oCO As ADODB.Command
    Set oCO = New ADODB.Command
    Set oCO.ActiveConnection = oConn
    oCO.CommandText = "pr_tambah_Trans2"
    oCO.CommandType = adCmdStoredProc
        
    oCO.Parameters("@no").Value = Text1.Text
    oCO.Parameters("@guest").Value = Text2.Text
    oCO.Parameters("@tglkirim").Value = dtp1.Value
    oCO.Parameters("@kode").Value = Text3.Text
    oCO.Parameters("@userkirim").Value = gUser
    oCO.Parameters("@personambil").Value = Text4.Text
    oCO.Parameters("@jamkirim").Value = Text5.Text
    oCO.Parameters("@staff").Value = Text7.Text
    oCO.Parameters("@ket").Value = Text6.Text
    oCO.Execute
    
    For i = 1 To MSFlexGrid1.Rows - 1
        If Trim(MSFlexGrid1.TextMatrix(i, 1)) <> "" Then
            oCO.CommandText = "pr_tambah_detail_Trans2"
            oCO.CommandType = adCmdStoredProc
            oCO.Parameters("@no").Value = Text1.Text
            oCO.Parameters("@kode").Value = MSFlexGrid1.TextMatrix(i, 1)
            oCO.Parameters("@kirim").Value = MSFlexGrid1.TextMatrix(i, 3)
            oCO.Parameters("@balance").Value = MSFlexGrid1.TextMatrix(i, 4)
            oCO.Execute
        End If
    Next i
    MsgBox "Data has been Saved...!", vbInformation, "Attention..."
    Call Cetak
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
    Text4.Text = ""
    Text5.Text = Time
    Text6.Text = ""
    Label11.Caption = ""
    dtp1.Value = Date
    Label8.Caption = ""
    Text7.Text = ""
    MSFlexGrid1.Rows = 2
    MSFlexGrid1.TextMatrix(1, 1) = ""
    MSFlexGrid1.TextMatrix(1, 2) = ""
    MSFlexGrid1.TextMatrix(1, 3) = ""
    MSFlexGrid1.TextMatrix(1, 4) = ""
    Text1.SetFocus
    'Call SemuaKirim
Exit Sub
iniEror:
    MsgBox Err.Description, vbCritical
End Sub
   

       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! 
FareChase.

[Non-text portions of this message have been removed]

Kirim email ke