Selasa, 19 Juni 2012

VB6.0 Form Penjualan HandPhone(aja)

VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form1
   Caption         =   "Penjualan HandPhone"
   ClientHeight    =   6900
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10230
   LinkTopic       =   "Form1"
   ScaleHeight     =   6900
   ScaleWidth      =   10230
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtjumlah1
      Height          =   285
      Left            =   1920
      TabIndex        =   30
      Top             =   1920
      Width           =   1695
   End
   Begin VB.ComboBox Combo2
      Height          =   315
      Left            =   1920
      TabIndex        =   29
      Text            =   "pilih kode ACC"
      Top             =   2760
      Width           =   2055
   End
   Begin VB.CommandButton Command1
      BackColor       =   &H00000000&
      Caption         =   "CETAK"
      Height          =   375
      Left            =   7560
      TabIndex        =   28
      Top             =   5880
      Width           =   1095
   End
   Begin MSAdodcLib.Adodc Adodc1
      Height          =   615
      Left            =   8160
      Top             =   4560
      Visible         =   0   'False
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   1085
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\VB6_TI6P_AMCS\akhir\db_hp.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\VB6_TI6P_AMCS\akhir\db_hp.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton cmdkeluar
      Caption         =   "KELUAR"
      Height          =   375
      Left            =   8880
      TabIndex        =   26
      Top             =   5880
      Width           =   1095
   End
   Begin VB.CommandButton cmdbatal
      Caption         =   "BATAL"
      Height          =   375
      Left            =   6240
      TabIndex        =   25
      Top             =   5880
      Width           =   1095
   End
   Begin VB.CommandButton cmdsimpan
      Caption         =   "SIMPAN"
      Height          =   375
      Left            =   4920
      TabIndex        =   24
      Top             =   5880
      Width           =   1095
   End
   Begin VB.TextBox txtkembali
      Height          =   405
      Left            =   5880
      Locked          =   -1  'True
      TabIndex        =   23
      Top             =   4560
      Width           =   1695
   End
   Begin VB.TextBox txtbayar
      BeginProperty DataFormat
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1057
         SubFormatType   =   1
      EndProperty
      Height          =   405
      Left            =   5880
      TabIndex        =   22
      Top             =   3480
      Width           =   1695
   End
   Begin MSComCtl2.DTPicker DTPicker1
      Height          =   375
      Left            =   6120
      TabIndex        =   19
      Top             =   720
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   661
      _Version        =   393216
      Format          =   38600705
      CurrentDate     =   41065
   End
   Begin VB.TextBox txtnota
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   6120
      TabIndex        =   18
      Top             =   240
      Width           =   1815
   End
   Begin VB.TextBox txttotal
      Height          =   375
      Left            =   1920
      TabIndex        =   15
      Top             =   6000
      Width           =   1695
   End
   Begin VB.TextBox txtjumlah2
      Height          =   285
      Left            =   1920
      TabIndex        =   14
      Top             =   5280
      Width           =   1695
   End
   Begin VB.TextBox txtharga2
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1920
      Locked          =   -1  'True
      TabIndex        =   13
      Top             =   4560
      Width           =   1695
   End
   Begin VB.TextBox txtket2
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   1920
      Locked          =   -1  'True
      TabIndex        =   12
      Top             =   3960
      Width           =   2535
   End
   Begin VB.TextBox txtharga1
      Height          =   285
      Left            =   1920
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   1440
      Width           =   1695
   End
   Begin VB.TextBox txtket1
      Height          =   285
      Left            =   1920
      Locked          =   -1  'True
      TabIndex        =   10
      Top             =   840
      Width           =   2655
   End
   Begin VB.ComboBox Combo1
      BeginProperty DataFormat
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   1057
         SubFormatType   =   1
      EndProperty
      Height          =   315
      Left            =   1920
      TabIndex        =   9
      Text            =   "pilih kode"
      Top             =   360
      Width           =   1695
   End
   Begin VB.OLE OLE1
      Height          =   1695
      Left            =   6120
      TabIndex        =   27
      Top             =   1320
      Width           =   2655
   End
   Begin VB.Label Label13
      Caption         =   "Kembali"
      Height          =   495
      Left            =   5040
      TabIndex        =   21
      Top             =   4560
      Width           =   1095
   End
   Begin VB.Label Label12
      Caption         =   "Bayar"
      Height          =   375
      Left            =   5040
      TabIndex        =   20
      Top             =   3480
      Width           =   975
   End
   Begin VB.Line Line4
      X1              =   120
      X2              =   4800
      Y1              =   6720
      Y2              =   6720
   End
   Begin VB.Line Line3
      X1              =   4800
      X2              =   4800
      Y1              =   0
      Y2              =   6720
   End
   Begin VB.Line Line2
      X1              =   240
      X2              =   4800
      Y1              =   5760
      Y2              =   5760
   End
   Begin VB.Line Line1
      X1              =   240
      X2              =   4800
      Y1              =   2400
      Y2              =   2400
   End
   Begin VB.Label Label11
      Caption         =   "Tanggal"
      Height          =   255
      Left            =   5040
      TabIndex        =   17
      Top             =   720
      Width           =   1455
   End
   Begin VB.Label Label10
      Caption         =   "No Transaksi"
      Height          =   375
      Left            =   5040
      TabIndex        =   16
      Top             =   240
      Width           =   1335
   End
   Begin VB.Label Label9
      Caption         =   "Total"
      Height          =   255
      Left            =   240
      TabIndex        =   8
      Top             =   6120
      Width           =   1815
   End
   Begin VB.Label Label8
      Caption         =   "Jumlah"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   5280
      Width           =   1455
   End
   Begin VB.Label Label7
      Caption         =   "Harga"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   4560
      Width           =   1695
   End
   Begin VB.Label Label6
      Caption         =   "keterangan"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   3960
      Width           =   1695
   End
   Begin VB.Label Label5
      Caption         =   "Kode Accecories"
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   2760
      Width           =   1575
   End
   Begin VB.Label Label4
      Caption         =   "Jumlah (unit)"
      Height          =   255
      Left            =   240
      TabIndex        =   3
      Top             =   1920
      Width           =   1455
   End
   Begin VB.Label Label3
      Caption         =   "Harga"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   1440
      Width           =   1455
   End
   Begin VB.Label Label2
      Caption         =   "Keterangan"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   840
      Width           =   1455
   End
   Begin VB.Label Label1
      Caption         =   "Kode HandPhone"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   1455
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim total As Long
Private Sub cmdbatal_Click()
kosongkan

End Sub
Sub hitung()
txttotal.Text = txtharga1.Text + txtharga2.Text
End Sub
Sub aktifkan(x As Boolean)
    Combo1.Enabled = x
    Combo2.Enabled = x
    txtbayar.Enabled = x
    txtharga1.Enabled = x
    txtjumlah1.Enabled = x
    txtjumlah2.Enabled = x
    txtharga2.Enabled = x
    txtkembali.Enabled = x
    txtket1.Enabled = x
    txtket2.Enabled = x
    txtnota.Enabled = x
End Sub
Sub kosongkan()
    Combo1.Enabled = True
    Combo2.Enabled = True
    txtbayar.Text = ""
    txtharga1.Text = ""
    txtjumlah1.Text = ""
    txtjumlah2.Text = ""
    txtharga2.Text = ""
    txtkembali.Text = ""
    txtket1.Text = ""
    txtket2.Text = ""
    txtnota.Text = ""
End Sub
Private Sub cmdkeluar_Click()
    End
End Sub
Private Sub cmdsimpan_Click()
Adodc1.Recordset.AddNew

Adodc1.Recordset!kodehp = Combo1.Text
Adodc1.Recordset!kethp = Combo1.Text
Adodc1.Recordset!hargahp = txtharga1.Text
Adodc1.Recordset!jumlahhp = txtharga1.Text
Adodc1.Recordset!kodeacc = Combo2.Text
Adodc1.Recordset!hargaacc = txtharga2.Text
Adodc1.Recordset!jumlahacc = txtjumlah2.Text
Adodc1.Recordset!notransaksi = txtnota.Text
Adodc1.Recordset!tanggal = DTPicker1.Index
End Sub

Private Sub Combo1_Click()
'1
If Combo1.ListIndex = 0 Then
        txtket1.Text = "ASUS M10"
        txtharga1.Text = 3000000
'2
ElseIf Combo1.ListIndex = 1 Then
        txtket1.Text = "SAMSUNG P100"
        txtharga1.Text = 3200000
'3
ElseIf Combo1.ListIndex = 2 Then
        txtket1.Text = " NOKIA N900"
        txtharga1.Text = 27000
'4
ElseIf Combo1.ListIndex = 3 Then
        txtket1.Text = "NOKIA N8"
        txtharga1.Text = 2100000
               
End If
End Sub

Private Sub Combo2_Click()
'1
If Combo2.ListIndex = 0 Then
        txtharga2.Text = "40000"
        txtket2.Text = "Kabel Data C45"
'2
ElseIf Combo2.ListIndex = 1 Then
        txtharga2.Text = 17000
        txtket2.Text = "MIC 225-2630"
'3
ElseIf Combo2.ListIndex = 2 Then
        txtharga2.Text = 100000
        txtket2.Text = "BATERAI BL-4TC"
'4
ElseIf Combo2.ListIndex = 3 Then
        txtharga2.Text = 15000
        txtket2.Text = "Plug In Connector 8250"
        End If
End Sub

Private Sub Form_Load()
'memasukan nilai ke combo1
 Combo1.AddItem "ASM 10"
 Combo1.AddItem "SMP1000"
 Combo1.AddItem "NKN 9000"
 Combo1.AddItem "NKN 8"
 'memasukan nilai ke comno2
            Combo2.AddItem "KDC 45"
            Combo2.AddItem "MC 225"
            Combo2.AddItem "BTBL-4TC"
            Combo2.AddItem "PIC 8520"
End Sub



Antonius, S.Kom