[RESOLVED] a question of query
I have a tabel from access 2k with field:
NoNota (autonumber)
tanggal (date)
kodepelanggan (text)
namapelanggan (text)
subtotal (number)
pot (number)
total (number)
when I query msql = "insert...." it work fine and autonumber created,
at the same the msql = "select * from..." doesnot return an autonumber
on form textbox.
I use command call save1 in the button click event
run time error
"either BOF or EOF is true, or the current record has been deleted."
"requested operation require a current record"
any sugestion is very much appreciated
thanks in advance
VB Code:
Sub Save1()
Dim msql As String
msql = "insert into tbnotajual(tanggal)values('" & dptanggal & "')"
con_data.Execute (msql)
rs.Requery
msql = "select * from tbnotajual" & _
"where nonota in (select max(NoNota) from tbnotajual)"
txtnota.Text = rs.Fields(Val("NoNota"))
con_data.Execute (msql)
rs.Requery
txtkodebarang.SetFocus
End Sub
Re: [RESOLVED] a question of query
really help
much appreciated
thanks