This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub cmdBatal_Click() | |
Call BersihForm | |
End Sub | |
Private Sub cmdHapus_Click() | |
strSQL = "Delete from Mahasiswa where NIM = '" & txtNIM.Text & "'" | |
Call execCmd(dbCmd, strSQL) | |
Call BersihForm | |
FillGrid | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public dbconn As ADODB.Connection | |
Public rs As ADODB.Recordset | |
Public dbCmd As ADODB.Command | |
Public strSQL As String</pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Fungsi untuk membuka koneksi | |
Public Function OpenConnection() | |
Set dbconn = New ADODB.Connection | |
dbconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\mahasiswa.mdb;Persist Security Info=False" | |
dbconn.CursorLocation = adUseClient | |
dbconn.Open | |
End Function | |
'Fungsi untuk membuat query yang menghasilkan recordset | |
Public Function bukaRs(Query As String, Record As Recordset) | |
Set Record = New ADODB.Recordset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Module ModVar | |
Public dbConn As ADODB.Connection | |
Public rs As ADODB.Recordset | |
Public dbCmd As ADODB.Command | |
Public strSQL As String | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Module modUtil | |
Public Function OpenConnection() | |
Set dbconn = New ADODB.Connection | |
dbconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Project\latihan1\mahasiswa.mdb;Persist Security Info=False" | |
dbconn.CursorLocation = adUseClient | |
dbconn.Open | |
End Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public dbconn As ADODB.Connection | |
Public rs As ADODB.Recordset | |
Public dbCmd As ADODB.Command | |
Public strSQL As String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Fungsi untuk membuka koneksi | |
Public Function OpenConnection() | |
Set dbconn = New ADODB.Connection | |
dbconn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + App.Path + "\mahasiswa.mdb;Persist Security Info=False" | |
dbconn.CursorLocation = adUseClient | |
dbconn.Open | |
End Function | |
'Fungsi untuk membuat query yang menghasilkan recordset | |
Public Function bukaRs(Query As String, Record As Recordset) | |
Set Record = New ADODB.Recordset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub cmdBatal_Click() | |
Call BersihForm | |
End Sub | |
Private Sub cmdHapus_Click() | |
strSQL = "Delete from Mahasiswa where NIM = '" & txtNIM.Text & "'" | |
Call execCmd(dbCmd, strSQL) | |
Call BersihForm | |
FillGrid | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub cmdCoba_Click() | |
Dim strTest As String | |
strTest = InputBox("Please enter a string:") | |
Print "Contoh Len:"; Tab(25); Len(strTest) | |
Print "Contoh Mid$:"; Tab(25); Mid$(strTest, 3, 4) | |
Print "Contoh Left$:"; Tab(25); Left$(strTest, 3) | |
Print "Contoh Right$:"; Tab(25); Right$(strTest, 2) | |
Print "Contoh UCase$:"; Tab(25); UCase$(strTest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long | |
Private Sub Command1_Click() | |
Call tutupsemua | |
Form2.Show | |
SetParent Form2.hWnd, Picture1.hWnd ' You could also substitute a Frame for the picturebox | |
Form2.Move 0, 0 | |
End Sub | |
Private Sub tutupsemua() | |
Unload Form2 |
OlderNewer