Write Conflict- Where to intercept?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This question appends to a previous post (which is closed?) located at:
http://www.microsoft.com/office/com...026c&mid=1f635944-f770-47ee-ba03-b6a5bf97026c

The discussion was resolution of a write conflict caused by a dirty record:
(code executing and adding to a record)

I think I've just had the same intermittent problem crop up for due to the
third reason. Albert Kallil suggested a way to prevent the problem by
changing dirty to false:

1) Do I understand you usually reset dirty to false when you close out a
form that shares a recordset, or do you do it ALSO BETWEEN
functions/procedures also?

2) regarding dirty- Is it just a "flag" then to give status? Or
is there anything else going on when you "reset" it? (ie: like a write).

Trying to understand, thanks-
Loralee
 
hi Loralee,
1) Do I understand you usually reset dirty to false when you close out a
form that shares a recordset, or do you do it ALSO BETWEEN
functions/procedures also?
You use it always when you need to save a record before processing it.
2) regarding dirty- Is it just a "flag" then to give status? Or
is there anything else going on when you "reset" it? (ie: like a write).
When setting Dirty = False the recored is written to disk. This is imho
the best method to save a record, cause it avoids the DoCmd.


mfG
--> stefan <--
 
So in the Form's Module, if I have a set of subs or functions that call
one-another, do I need to use it in EACH function/procedure? The recordset
is the form's recordset.

(I have a validation function that runs before the final close dialog comes
up. It passes a bool to the final close dialog that tells if data is valid.
The final close dialog allows the user to select if they are FINISHED or
FINISH LATER. For FINISHED, system date and user is saved. I THOUGHT the
Write Conflict was occuring with the saving of the system date, so I inserted
"dirty = false" at the end of validation check. The problem is still
recurring intermittently. I don't want to "spray" dirty changes all over the
place, hence the question..)

And, I don't understand the second part- "This is imho
the best method to save a record, cause it avoids the DoCmd" -- Is it NOT
best to avoid docmd or is it BEST to avoid the docmd?

Thanks,
Loralee
 
hi Loralee,
So in the Form's Module, if I have a set of subs or functions that call
one-another, do I need to use it in EACH function/procedure? The recordset
is the form's recordset.
Yes, when your other methods operate on the dirty record.
And, I don't understand the second part- "This is imho
the best method to save a record, cause it avoids the DoCmd" -- Is it NOT
best to avoid docmd or is it BEST to avoid the docmd?
It is better to avoid DoCmd, if possible. In the past i had some trouble
when too many DoCmd calls where made.



mfG
--> stefan <--
 

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

Back
Top