Update

  • Thread starter Thread starter Sash
  • Start date Start date
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
 
Hi Sash,
instead of the close and deactivate events, use the Unload event. It should
work.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
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."
 
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.
 
Back
Top