Update

S

Sash

I'm trying to update a few fields on a form on the click of a button. My
problem is that the form exclusively has the the table opened. I'm having
TOTAL brain freeze on this one. I tried updating on the close of the form,
deactivate the form, but nothing works.

Dim strSQLSent as String
strSQLSent = "UPDATE DischDisp set SentToRTI = #" & Date & "# WHERE
SentToRTI is null and DetailUpdatedBy is not null"
DoCmd.RunSQL strSQLSent
 
J

Jeanette Cunningham

Hi Sash,
instead of the close and deactivate events, use the Unload event. It should
work.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
S

Sash

Thanks Jeanette, but I still get same message "The table is already open
exclusively by another user, or it is already open through the user interface
and cannot be manipulated programmatically."
 
J

John W. Vinson

Thanks Jeanette, but I still get same message "The table is already open
exclusively by another user, or it is already open through the user interface
and cannot be manipulated programmatically."

The other user is almost certainly you. If you have a bound form editing the
table, for example, your VBA code will not be able to also open the recordset
exclusively.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top