Afternoon,
So after lots of very helpful advice form this forum!
i have the below code which inserts data and then i want to retrieve the value in the first two columns but firstly it says "you must use dbseechanges" but i have put this into the code you may see below,
Code:
Dim db As DAO.Database
Dim rs As DAO.Recordset
dim sSQL as string
sSQL = "INSERT INTO claims (Clientcc, DriverCc, Crefname, Crefcc, creg, cadt) VALUES ('" & ClientCc & "', '" & DriverCc & "', '" & CrefName & "', '" & CrefCc & "', '" & Creg & "', '" & DOA & "')"
Set db = CurrentDb
db.Execute sSQL
Set rs = db.OpenRecordset("claims", , dbSeeChanges)
CClc = rs.Fields(0)
Debug.Print rs.Fields(0)
CClaimref = rs.Fields(1)
Debug.Print CClaimref
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
Once again big thanks to anyone that helps!