Form unutk mengetes . . .
Private Sub Command_Click(Index As Integer)
Select Case Index
Case 0 ' foto
'If Not rs.EOF Then
CommonDialog1.Filter = "All Picture files|*.bmp;*.jpg;*.gif;*.dib*|JPEG Images|*.jpg|Bitmaps|*.bmp|All Files|*.*"
CommonDialog1.ShowOpen
Text1.Text = CommonDialog1.FileName
Image1.Picture = LoadPicture(Text1.Text)
' End If
Case 1 ' Simpan
Set rs = ConnAPP.Execute("SELECT * FROM Test WHERE Kde_Test = '" & Text1.Text & "'")
rs.Close
Set rs = ConnAPP.Execute("insert into Test(Kde_test,foto)values('" & Text1 & "','" & Image1 & "')")
MsgBox "Berhasil Disimpan", vbInformation + vbOKOnly, "Simpan"
SavePicture Me.Image1.Picture, App.Path & "\Foto\" & Image1.Picture
Call bersih
Case 2 ' batal
Call bersih
Case 3 ' keluar
Unload Me
End Select
End Sub
Private Sub bersih()
Text1.Text = ""
Image1.Picture = LoadPicture("")
End Sub