Update Query with Yes/No

  • Thread starter Thread starter Doctor
  • Start date Start date
D

Doctor

I am trying to update all ChurchActiveCharter to NO and all
ChurchCurrentCharter to YES where ChurchActiveCharter is already YES. But as
far as I can tell, it is not updating the records in datasheet view
everything is left as it was before the update query is run.

Here is the code I have now:

UPDATE Church SET Church.ChurchActiveCharter = 0,
Church.ChurchCurrentCharter = - 1
WHERE ((([ChurchActiveCharter]+[ChurchCurrentCharter])<>0));

Any help would be greatly appreciated
 
UPDATE Church
SET Church.ChurchActiveCharter = False,
Church.ChurchCurrentCharter = True
WHERE [ChurchActiveCharter]= True OR [ChurchCurrentCharter] = True

That should update the records as long as you execute the query (Select
Query: Run from the menu). If you just switch the view to datasheet
view you will not actually update the records. You will just see which
records would be updated if you executed the query.

As far as I can tell your original query should also work.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
Back
Top