Suggestions:
1. Make sure you have:
Option Explicit
at the top of every module. This will prevent Access from just making up a
variable for any name it does not recognise.
2. Before you can change the fields of a record, you need to Edit, and
afterwards to Update:
rs.Edit
'change the fields here
rs.Update
3. Refer to the fields of the recordset like this:
rs![Field1] = strPassStamp
Instead of opening a recordset, you could also do it by executing an Update
query statement.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
<Ap******@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
Hello
I'm trying to save data to an Existing Record in a single table. These
fields
are not on my Form.
It is not saving the data to the record ???
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
strSQL = "SELECT * FROM [T-ADXOR] Where ID = 19"
Set rs = db.OpenRecordset(strSQL, dbOpenForwardOnly)
If rs.BOF = False And rs.EOF = False Then
[Field1] = strPassStamp
[Field2] = strPermStamp
MsgBox [Field1] '<------- The values are showing but not saving
MsgBox [Field2] '<------- " "
End If
ALSO I am in desperate need of good reference material advice. I spend
ALL day
hunting for syntax & rules information. Anything one can recommend?
ThankYou