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:
  1. Sub Save1()
  2. Dim msql As String
  3.  
  4. msql = "insert into tbnotajual(tanggal)values('" & dptanggal & "')"
  5.  
  6. con_data.Execute (msql)
  7. rs.Requery
  8.  
  9. msql = "select * from tbnotajual" & _
  10.        "where nonota in (select max(NoNota) from tbnotajual)"
  11.  
  12. txtnota.Text = rs.Fields(Val("NoNota"))
  13. con_data.Execute (msql)
  14. rs.Requery
  15. txtkodebarang.SetFocus
  16.  
  17. End Sub