Log in

View Full Version : minta help gan


SinggahDapur
20th November 2011, 12:58 PM
gan ane mintak tolong, apa yang saalah dari script program ane....tombol simpan ane ga fungsi malah error mulu



ni scriptnya



Private Sub cmdsimpan_Click()

Dim sqlsimpan As String

Call dbmlindjo

If Textharga.Text = "" Then

MsgBox "Harga Masih Kosong!", vbInformation + vbOKOnly, "informasi"

Textharga.SetFocus

ElseIf Textmakanan.Text = "" Then

MsgBox "Makanan Masih Kosong!", vbInformation + vbOKOnly, "informasi"

Textmakanan.SetFocus

ElseIf Textrm.Text = "" Then

MsgBox "Rumah Makan Masih Kosong!", vbInformation + vbOKOnly, "informasi"

Textrm.SetFocus

ElseIf Combo_status.Text = "" Then

MsgBox "Silahkan Pilih Jenis!", vbInformation + vbOKOnly, "informasi"

ElseIf Combo_status.Text = "" Then

MsgBox "Jenis masih Kosong!", vbInformation + vbOKOnly, "informasi"

Combo_status.SetFocus

Else

sqlsimpan = "insert into panganan values"

sqlsimpan = sqlsimpan & "'" & Textharga.Text & "',"

sqlsimpan = sqlsimpan & "'" & Textmakanan.Text & "',"

sqlsimpan = sqlsimpan & "'" & Textrm.Text & "',"

sqlsimpan = sqlsimpan & "'" & Combo_status.Text & "',"

connmlindjo.Execute (sqlsimpan)

rsmlindjo.Requery

cmdsimpan.Enabled = False

cmdtambah.Enabled = True

End If

End Sub

</div>