Current Record

Nero

Shop smart, shop S-Mart
Local time
Today, 06:09
Joined
Jan 8, 2002
Messages
217
Hi all,
I have a routine ,part of it is to update a field value in the current record. I am using
with rst
.Edit
.Fields("MyField") = "My Value"
.Update
.Close

etc,etc,
The problem is that instead of updating the current record it is updating the first record.
I have used this many times before but not with this result.
Can anyone stop me from banging my head against a brick wall...Please...
 
What do you mean by current record? Do you refer to the current record in your form? If so why do you use a recordset at all?

The point in your code is that there is no place where you indicate Access what the current record should be. Usually, you would begin to set the 'cursor' to the record you want (using the movefirst, movelast, movenext, or seek/find methods according to your case), THEN do the changes and update the record.
 
Alex,
Thanks for your reply.
I have managed to solve it now.
What I am doing is using the common dialog to aid the user to insert a path to a stored image file in a table
ie.
.Fields("PathHolder") = Cmdlg.FileName
Maybe I'm going about this all wrong but It seems to be working now.

Thanks again,
Kev.
 

Users who are viewing this thread

Back
Top Bottom