Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update statement

Status
Not open for further replies.

rizunb

Programmer
Feb 27, 2003
63
0
0
CA
Hi People
I am executing an update statement in vba
Once the update is done and when I go to choose any thing from any of the combo boxes on the form. following messages gets displayed.

"The Data has been changed.
Another user edited this record and saved the changes before you attempted to save your changes
re-edit the record"

Even though its only me who is using that access file.
I dont know why this is happening
 
Hi rizunb and zevw,

I'm not sure how you are executing this "update statement in vba", but what I would do is:

Docmd.Echo False
Me.RecordSource = ""
Docmd.SetWarnings False
''''Run or Execute your Query
Docmd.SetWarnings True
Me.RecordSource = "OriginalTableOrQuery"
Docmd.Echo True

Bill
 
Hi!

I was looking at the update statement in vba. For what I am doing, I am running my update query from a form on an "after update" event. The problem I am having is after I run the update query and return to my orignal record source for my form, it changes the record that I was on to the first record of my from instead of record "111" that I was working on. Is there a way to store the record ID and after running the update query, have it return to the record that I was working on? If so, what would be the code? Any help would greatly be appreciated.

Thanks!

D
 
Ezyflo!

I responded to this problem in Thread #

thread705-612488

Check it out!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top