Silahkan buat satu modul di project anda dan copykan script berikut.
Public CONN As ADODB.Connection Public RSKasir As ADODB.Recordset Public RSBarang As ADODB.Recordset Public RSPenjualan As ADODB.Recordset Public RSDetail As ADODB.Recordset Public LokasiData As String Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long Public Const SW_SHOW = 5 Public Sub Koneksi() Set CONN = New ADODB.Connection Set RSKasir = New ADODB.Recordset Set RSBarang = New ADODB.Recordset Set RSPenjualan = New ADODB.Recordset Set RSDetail = New ADODB.Recordset LokasiData = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\DBPenjualan.mdb;Persist Security Info=False" CONN.Open LokasiData End Sub
Daftar semua artikel untuk tutorial Cara Membuat Aplikasi Penjualan Dengan Visual Basic 6 ini..