473,396 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Write Conflict Message - Turn Off!

After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord.

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmpersonnelmain!frmTAB1part4!curPos
temp_title = Forms!frmpersonnelmain!frmTAB1part4!curTitle
temp_salary = Forms!frmpersonnelmain!frmTAB1part4!curSalary

Forms!frmpersonnelmain![tblPosition.PosStatusID] = 2 'vacant
MsgBox "pos=vacant"

If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If

If Forms!frmpersonnelmain!frmTAB1part4!Designation = 11 Then
'<----rollback for new hire!
Forms!frmpersonnelmain![tblEmployee.PosID] = Null
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmpersonnelmain!EmpStatus = 0 'inactive
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
Exit Sub
End If

Forms!frmpersonnelmain!frmTAB1part4!PosID = temp_pos
Forms!frmpersonnelmain![tblEmployee.PosID] = temp_pos
Forms!frmpersonnelmain![tblPosition.JobClassID] = temp_title
Forms!frmpersonnelmain!MonthlySalary = temp_salary
Forms!frmpersonnelmain![cboHistFilt] = temp_pos
Forms!frmpersonnelmain![tblPosition.PosStatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian

Oct 22 '06 #1
8 12920
On 21 Oct 2006 21:41:10 -0700, ch************@yahoo.com wrote:
You rather get rid of the message than fix the underlying problem? No
problemo: just add "on error resume next" to the top of your
procedure.

Some of us would rather know what causes this, and fix the root cause.

-Tom.

>After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord.

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmpersonnelmain!frmTAB1part4!curPos
temp_title = Forms!frmpersonnelmain!frmTAB1part4!curTitle
temp_salary = Forms!frmpersonnelmain!frmTAB1part4!curSalary

Forms!frmpersonnelmain![tblPosition.PosStatusID] = 2 'vacant
MsgBox "pos=vacant"

If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If

If Forms!frmpersonnelmain!frmTAB1part4!Designation = 11 Then
'<----rollback for new hire!
Forms!frmpersonnelmain![tblEmployee.PosID] = Null
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmpersonnelmain!EmpStatus = 0 'inactive
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
Exit Sub
End If

Forms!frmpersonnelmain!frmTAB1part4!PosID = temp_pos
Forms!frmpersonnelmain![tblEmployee.PosID] = temp_pos
Forms!frmpersonnelmain![tblPosition.JobClassID] = temp_title
Forms!frmpersonnelmain!MonthlySalary = temp_salary
Forms!frmpersonnelmain![cboHistFilt] = temp_pos
Forms!frmpersonnelmain![tblPosition.PosStatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian
Oct 22 '06 #2
Actually, the routines work like I want them to work. There only
problem here is that I have a 'Write Conflict Error' that will not
respond to 'on error resume next' or even set warnings = false.
>From looking at the posts under this topic in this newsgroup, it seems
there is no way to turn it off.
I'm currently attempting to use update queries instead.
Very frustrating, especially when you have a deadline.

Christian

Oct 22 '06 #3
ch************@yahoo.com wrote in
news:11*********************@b28g2000cwb.googlegro ups.com:
Actually, the routines work like I want them to work.
Do you really want the routines to not work properly, give error
messages and fail to perform proper updates?

That's what you imply by saying "the way I want them to work".
>
Very frustrating, especially when you have a deadline.
Frustrating is having someone too smart to accept the fact that he
needs to fix the problem, not hide it.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 22 '06 #4
You don't think it has something to do with trying to set the Dirty to
"false" three times ??

He is trying to say the current record has not changed while it is
being changed ??

The update queries he was gonna try probably work better ??
PMG

Tom van Stiphout wrote:
On 21 Oct 2006 21:41:10 -0700, ch************@yahoo.com wrote:
You rather get rid of the message than fix the underlying problem? No
problemo: just add "on error resume next" to the top of your
procedure.

Some of us would rather know what causes this, and fix the root cause.

-Tom.

After searching the group and the net, I just can't believe after all
this work I'm going to have to sit through three Write Conflict
messages when I want to roll back and delete a record.

The action rolls back a new hire record, deleting it from a joining
table between employee and position - tblPosEmpRecord.

It's a many to many join.

The new hire action updates the employee with a new position and logs
it in the connecting record table.

If a user accidentally assigns the wrong position, they will need to
rollback the change and erase the connecting record, store a null in
the employee tables' position number, and store 'vacant' in the
position table for that record.

Here's the rollback:

Public Sub rollback()
On Error Resume Next
Dim temp_pos As Long
Dim temp_title As Long
Dim temp_salary As Currency

temp_pos = Forms!frmpersonnelmain!frmTAB1part4!curPos
temp_title = Forms!frmpersonnelmain!frmTAB1part4!curTitle
temp_salary = Forms!frmpersonnelmain!frmTAB1part4!curSalary

Forms!frmpersonnelmain![tblPosition.PosStatusID] = 2 'vacant
MsgBox "pos=vacant"

If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If

If Forms!frmpersonnelmain!frmTAB1part4!Designation = 11 Then
'<----rollback for new hire!
Forms!frmpersonnelmain![tblEmployee.PosID] = Null
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain![cboHistFilt] = Null
MsgBox "new hire rollback REcord Deleted"
Forms!frmpersonnelmain!EmpStatus = 0 'inactive
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
Exit Sub
End If

Forms!frmpersonnelmain!frmTAB1part4!PosID = temp_pos
Forms!frmpersonnelmain![tblEmployee.PosID] = temp_pos
Forms!frmpersonnelmain![tblPosition.JobClassID] = temp_title
Forms!frmpersonnelmain!MonthlySalary = temp_salary
Forms!frmpersonnelmain![cboHistFilt] = temp_pos
Forms!frmpersonnelmain![tblPosition.PosStatusID] = 1 'filled
MsgBox "gothere? rollback"
If Forms!frmpersonnelmain.Dirty Then
Forms!frmpersonnelmain.Dirty = False
End If
Forms!frmpersonnelmain!frmTAB1part4!proPos.Requery
End Sub

It works, I just don't like the three WRITE CONFLICT messages popping
off. It's very obnoxios.

Thanks,

Christian
Oct 22 '06 #5
PeaceManGroove wrote:
You don't think it has something to do with trying to set the Dirty to
"false" three times ??
Of course it does. That's how it's saving the changes. Any other way
and it won't work.

When I say *work* I will reiterate - it works exactly how I want it to.
Does that count for anything these days? Obviously MS Access doesn't
think so.

He is trying to say the current record has not changed while it is
being changed ??
That's a trick to save the record. It is a known trick and works
correctly. That's not what's causing the error. The error is caused by
me changing the value of one of the keys I believe - I need to do that
because I want the record to follow the employee to his new position.
There is no way to do this without programming.
>
The update queries he was gonna try probably work better ??
FYI the update queries are doing the trick. No more Mama Access
complaining.

What's surprising me about the people who have commented on this topic
in this thread and other threads is that - you all take it for granted
that Mama Access knows best in ALL situations.

The whole reason why they have a set warnings off and on error resume
next is because when you're programming - you should be allowed to have
control of your freaking program.

Sure it's helpful to have error messages but having error messages that
you can't shut off is just plain wrong. I can't begin to explain all
the things I've tried in Access that by all rights should work but
didn't. I've had to find so many work arounds for what I wanted to do -
it's amazing they call this programming at all (sure, some don't).

So now that I've done the same thing with update queries as I orignally
did by passing variables - what's the difference MS Access?

There is none. That's why Access is wrong. In one case it regards the
action as a 'write conflict' error that there is no way to shut off -
and the same action in a different context it won't remark on at all.

Christian

Oct 24 '06 #6
ch************@yahoo.com wrote in news:1161665234.938184.9700
@m7g2000cwm.googlegroups.com:
That's why Access is wrong.
Yes, it doesn't work very well for what you're trying to do, does it?

What's the solution? Have you considered rewriting your whole application
for some other platform?

I recommend that course reluctantly, for probably you wouldn't post here
anymore if you did. That's sad but it's probably for the best.

Oh well, our loss will be someone else's gain.

Hope this helps!

--
Lyle Fairfield
Oct 24 '06 #7

Lyle Fairfield wrote:
Oh well, our loss will be someone else's gain.

Hope this helps!
How old are you again?

Speak for yourself next time Lyle. Attempting to speak for the Access
community and this global usenet forum in general is about as mature as
your other weaselly little comments.

How about this - if you don't know the answer to the question then
stfu.


Christian

Oct 24 '06 #8
ch************@yahoo.com wrote in news:1161734008.568914.13060
@i3g2000cwc.googlegroups.com:
How about this - if you don't know the answer to the question then
stfu.
Well, sure. I won't feel guilty because you can use all the other helpful
suggestions you received.

--
Lyle Fairfield
Oct 25 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Web Developer | last post by:
Hi, Question: Why is there an inherent conflict between uncompromising efficiency and portability in C++? Regards WD
3
by: gwaddell | last post by:
I have an Access XP ADE application connected to a SQL Server 7.0 SP4 database. I have created a timestamp column in the main table. Unfortunately, I am now getting persistent write conflict...
0
by: Andrew L. Gould | last post by:
This email is semi-off topic; but documents a problem and the server-side solution when using MS Access as a client to many (all?) database servers. I decided to post the problem/solution because...
6
by: Max | last post by:
Hi, I have SqlServer 2000 as back end and Access 2000 as front-end. All tables from Sqlserver are linked to Access 2000. I am having write conflict problem with one of my form which is bound to...
2
by: RC | last post by:
I am getting the following error message. "Write Conflict this record has been changed by another user since you started edting it. If you save the record, you will overwrite the changes...." I...
2
by: Mike MacSween | last post by:
I've been able, intermittently, to duplicate a problem a client had. Two users editing the same field of the same record. One saves. The other gets the 'another user has edited this record... do...
10
by: Eric E | last post by:
Hi all, I am using an Access client linked to a PG 7.4 server via ODBC. I have a stored proc on the server that inserts rows into a table.particular table, accomplished via an INSERT within the...
5
by: quortex | last post by:
Hi all, I have a class which contains a method called GetMessage(). When I compile and unit test it all is well. However in the application I want to use it in there appears to be a conflict...
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.