문제

I have a button click event that takes information from controls and enters it into a table via INSERT INTO SQL statement in VBA.

I was wondering if there is anything I could add to this, or some other method to acquire the record number that is created for the record?

Could I just turn around and SELECT against the table and use rs.last?

도움이 되었습니까?

해결책

You can "SELECT @@IDENTITY" from the same DAO.Database object variable where you previously executed your INSERT statement. See here on Stack OverFlow for details.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top