Acess 2007; SQL; "multiple-step operation" run-time error; resetting date fields.

GooberFish

New member
Local time
Today, 09:19
Joined
Apr 12, 2009
Messages
5
Acess 2007; SQL; "multiple-step operation" run-time error; resetting date fields.

I added a "reset" button to an Access form for inputting data. If a user clicks this button, content is deleted for the displayed record in selected fields of an associated table.

The VBA coding behind this button generates a recordset, then an SQL query obtains from the table the fields for the record in question, then the selected fields are set to "", e.g. --

rst![fldSomeData] = ""

I find this works as intended if the field from the Access table has a Text property; when, however, I seek to include date fields or checkbox fields, the coding throws returns this:

"Run-time error 2147217887 -- Multiple-step operation generated errors. Check each status value."

Do you have an idea or suggestion for VBA coding that will clear date and checkbox fields using the rst-SQL-set-to-"" method that I described above without returning this error? This seems like a pretty narrow and straightforward question, but I will be pleased to exhibit the code if needed.

Thanks very much for your kind help.
 
Re: Acess 2007; SQL; "multiple-step operation" run-time error; resetting date fields.

If you want to clear a field, use the Null keyword, i.e.

rst![fldSomeData] = Null

Also, have you considered firing up an UPDATE query in place of the recordset option?
 
Re: Acess 2007; SQL; "multiple-step operation" run-time error; resetting date fields.

Thanks for your help and feedback; I will pursue your suggestion to use the UPDATE query in place of a recordset.

Thanks again.
 
Re: Acess 2007; SQL; "multiple-step operation" run-time error; resetting date fields.

No problemo!
 

Users who are viewing this thread

Back
Top Bottom