coolcatkelso
Registered User.
- Local time
- Today, 00:10
- Joined
- Jan 5, 2009
- Messages
- 279
Hiya
I have this module
How would I refer to it to run it from a button?
I want to use the insert into and run it from a button
________
Bmw Dixi History
I have this module
Code:
Function ShowIdentity() As Variant
Dim db As DAO.Database
Dim rs As DAO.Recordset
>
Set db = DBEngine(0)(0)
db.Execute "INSERT INTO MyTable ( MyField ) SELECT 'nuffin' AS Expr1;"
>
Set rs = db.OpenRecordset("SELECT @@IDENTITY AS LastID;")
ShowIdentity = rs!LastID
rs.Close
>
Set rs = Nothing
Set db = Nothing
End Function
How would I refer to it to run it from a button?
I want to use the insert into and run it from a button
________
Bmw Dixi History
Last edited: