Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to suppress an error message

Status
Not open for further replies.

gord2

Programmer
Jun 20, 2003
16
0
0
CA
Hi all,

In Access 2002, how to use program code to suppress the following error message:

"Error #2448 with message: You can’t assign a value to this object."

Thank you.
 
Why not posting the code raising this error ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
why do you need to suppress this, should you not work out what is causing it and fix!!!

but to get around this error you could simply have the following within your sub

private sub testCode()
on error goto errHere

'*** your code here ***

exit sub
errHere:
if err.number <> 2448 then msgbox err.description
end sub


this will give you an error message for anything other than 2448

if you want it to continue with your code from the point it errorred you could always add a bit extra

errHere:
if err.number = 2448 then
resume next
else
msgbox err.description
end if

why are you getting the error should be the first question you ask yourself??

daveJam

even my shrink says its all your f#@/ing fault
 
It is generally better to come up with a way to avoid the error, if that is impossible, use an error handler (On Error GoTo ...)
 
Thank you all the quick response. Will check the error handler.

I am modifying someone's code temporarily. I just needed a quick fix.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top