"Adrian Parker" <ad***********@NOSPAMsympatico.ca> wrote in message
news:le*******************@news20.bellglobal.com.. .
For some reason when I call validateFields before .Update (see below),
I get this error: "Consumer's even handler called a non-reentrant method in
the provider"
However if I comment out the call to validateFields, all is fine.
What could possibly cause this error? What is a non-reentrant method?
What, you don't speak double-speak? <g>
The "provider" is presumably referring to your OLEDB provider, which is
maybe Jet or SQL Server or something. The "consumer" is your data
consumer, i.e. your recordset, i.e. you.
Non-reentrant means that something called a method in the provider,
which then called your code, which now tries to call the provider again,
but it can't be called again till the first one is done.
Which means probably you have some edit pending in bound fields, and
then while validating fields you are creating a new pending edit in the
recordset, or something like that.
The usual solution is for validation to check and return true or false,
but not to edit data itself. Pop up a message saying "Fill in a first
name before changing instructors", and then let them complete or cancel
their edit back on the main form.