victorialj
Technical User
Hi,
I have been trying now for several hours to open and update a recordset. I seem to be having trouble compiling the project and running it (or even F8'ing it!)
Basically all posts I have read, both hear and on the ms forums say I need to have the Microsoft DAO 3.6 ref selected in tools/references. However I do not even have a ref called this listed in mine at all? I am using 2002 on XP.
Is this actually the problem or is it something else?
I have inserted some of the code below (i have written and re-written several times today, so this is the latest I have tried!).
any help would be gratefully received:
Thanks
Victoria
I have been trying now for several hours to open and update a recordset. I seem to be having trouble compiling the project and running it (or even F8'ing it!)
Basically all posts I have read, both hear and on the ms forums say I need to have the Microsoft DAO 3.6 ref selected in tools/references. However I do not even have a ref called this listed in mine at all? I am using 2002 on XP.
Is this actually the problem or is it something else?
I have inserted some of the code below (i have written and re-written several times today, so this is the latest I have tried!).
any help would be gratefully received:
Code:
Dim db As Database
Dim rst As Recordset
Dim strTimeStamp As String
Dim strUsername As String
Set db = CurrentDb
Set rst = db.OpenRecordset("Prop Batch ID")
strTimeStamp = Now
strUsername = Environ("username")
With rst
.AddNew
!TimeStamp = strTimeStamp
!username = strUsername
.Update
End With
Thanks
Victoria