Link to home
Start Free TrialLog in
Avatar of mainrotor
mainrotor

asked on

I need assistance saving on a click event in ACCESS 2013

Hi Experts,
I need to save a record in an ACCESS 2013 to my tblJOb table on a button click event.  When I save the record using a VBA sql query, I want it to return The JobID (auto generated key) that was given to the newly created record.  How can I do this?  These are my table fields:

tblJob has the following fields:
JobID  (Primary key - auto generated)
JobName
COntactName
ContactPhone
ContactEmail

thank you very much in advance,
mrotor
SOLUTION
Avatar of Thommy
Thommy
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Scott McDaniel (EE MVE )
Are you using bound forms? If you are, then there's no need to use DAO to save the data. Let Access do this instead.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mainrotor
mainrotor

ASKER

Scott,
I am using an unbound table.
I will try Thommy's links and Helen's code a try.

mrotor