B
bw
The procedure below allows me to bypass "The Data has changed" error I get.
It seems silly, but it works, and all my data is correct every. My
procedure
is updating data in a "SubForm2".
Conclusion 1: The error is "just" an advisory message, and all we need do
is ignore it, as I do here.
Conclusion 2: The error makes SubForm2 Dirty without me telling it to do so.
While I've looked everywhere to find out what's causing this error, I've not
seen anything that really explains what's going on. Maybe someone will take
a
stab at answering some/all of the following:
1. Is "The Data has changed" message "just" an advisory message?
2. If it is just an advisory message, can it be turned off?
3. Since I know this error will occur "nearly" every time I call the
procedure,
is there a way to prevent it before hand?
4. What is the syntax for making SubForm2 Dirty?
5. If I make SubForm2 Dirty, will it prevent the error from occurring? If
so,
do I make it Dirty Within the procedure, or Before calling the
procedure?
6. If I make SubForm2 Dirty, and it prevents the error from occurring, then
why does MSAccess do this? I don't understand why this is necessary
as my silly procedure accomplishes the same thing.
7. Any comments for all us non-experts that will help clarify this
particular error
message will be appreciated.
My procedure follows:
Thanks,
Bernie
Private Sub TestError()
On Error GoTo ShowError
ResumeAfterError:
.....
.....
.....
.....
Exit Sub
ShowError:
If Err.Number = 7878 Then
' MsgBox "TestError " & Err.Number & " " & Err.Description
Resume ResumeAfterError
Else
MsgBox "TestError " & Err.Number & ", Description = " &
Err.Description
Exit Sub
End If
End Sub
It seems silly, but it works, and all my data is correct every. My
procedure
is updating data in a "SubForm2".
Conclusion 1: The error is "just" an advisory message, and all we need do
is ignore it, as I do here.
Conclusion 2: The error makes SubForm2 Dirty without me telling it to do so.
While I've looked everywhere to find out what's causing this error, I've not
seen anything that really explains what's going on. Maybe someone will take
a
stab at answering some/all of the following:
1. Is "The Data has changed" message "just" an advisory message?
2. If it is just an advisory message, can it be turned off?
3. Since I know this error will occur "nearly" every time I call the
procedure,
is there a way to prevent it before hand?
4. What is the syntax for making SubForm2 Dirty?
5. If I make SubForm2 Dirty, will it prevent the error from occurring? If
so,
do I make it Dirty Within the procedure, or Before calling the
procedure?
6. If I make SubForm2 Dirty, and it prevents the error from occurring, then
why does MSAccess do this? I don't understand why this is necessary
as my silly procedure accomplishes the same thing.
7. Any comments for all us non-experts that will help clarify this
particular error
message will be appreciated.
My procedure follows:
Thanks,
Bernie
Private Sub TestError()
On Error GoTo ShowError
ResumeAfterError:
.....
.....
.....
.....
Exit Sub
ShowError:
If Err.Number = 7878 Then
' MsgBox "TestError " & Err.Number & " " & Err.Description
Resume ResumeAfterError
Else
MsgBox "TestError " & Err.Number & ", Description = " &
Err.Description
Exit Sub
End If
End Sub