Basically, that is the question.
After data entry, and saving procedure I need to get the ID for that entry.
I need the ID that these data are stored under. I need it for the next step in the same procedure.
How is it possible to get that ID? That is the last ID inserted in that table.
After data entry, and saving procedure I need to get the ID for that entry.
Code:
Private Sub dgmPotvrdi_Click()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("klijenti", dbOpenDynaset)
rs.AddNew
rs!NazivFirme = Me!klijent
rs!Ime = Me!Ime
rs!Prezime = Me!Prezime
rs!AlternativniKontakt = Me!AlternativniKontakt
rs!Grad = Me!Grad
rs!PostanskiBroj = Me!Pbroj
rs!Adresa = Me!Adresa
rs!Telefoni = Me!Telefoni
rs!Fax = Me!Fax
rs![e-mail] = Me!email
rs.Update
rs.Close
db.Close
I need the ID that these data are stored under. I need it for the next step in the same procedure.
How is it possible to get that ID? That is the last ID inserted in that table.