Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AddNew and ID 1

Status
Not open for further replies.

DougAtAvalon

Programmer
Jan 29, 2001
99
US
with the following code I usually can use a dlast method to get the AutoID number assigned. I'm having a problem any ideas on how to retreive that number?
-------------------------------
Set dbs = CurrentDb
Set rcrdset = dbs.OpenRecordset("Candidates")
rcrdset.AddNew
rcrdset![DateOfEntry] = Format(Now(), "mm/dd/yy")
rcrdset!ID = Forms![Organizations].[Placements Subform].Form.ID
rcrdset!ContactID = vContactID
rcrdset!ResumeSent = vResumeSentFromPopUp
rcrdset.Update
rcrdset.Close
Set dbs = Nothing
Set rcrdset = Nothing
---------------------------------

thanx,

Doug
 
vContactID=iif(dcount("ContactID","Candidates")=0,1, _
dmax("ContactID","Candidates")+1)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top