.Update

M

Molly

What is the proper format of the .Update code?

I've tried:

Me!txtPrintData = Null
With rst
.Edit
!printData = Me!txtPrintData
.Update ,True
End With
and end up with a runtiime error. I need to update a field in a table
without access message 'Write Conflict'

TIA
Molly
 
P

PC Datasheet

Molly,

Your recordset approach is wrong!

If you are trying to set the field, txtPrintData, in the current record to Null,
all you need in your code is:
Me!txtPrintData = Null

If you are trying to set the field, txtPrintData, in all the records in your
table to Null, then you need to execute an update query. Create a query named
MyUpdateQuery based on the table containing the field, txtPrintData. Just
pulldown into the query grid, txtPrintData. Click on the query type button on
the toolbar and change the query to an update query. Where it says Update To
under txtPrintData, enter Null. Use this code to run the query:

DoCmd.SetWarnings False
DoCmd.OpenQuery "MyUpdateQuery"
DoCmd.SetWarnings True
 

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