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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If Err.Number <> 0 Then

Status
Not open for further replies.

ukwebsite

Programmer
Dec 9, 2000
82
GB

Please help. I have the folling code

Code:
On Error Resume Next
If Err.Number <> 0 Then
	Response.write "errror"   
End If

I have called a field from a database that does not exisit, this would normally cause an error. But for some reason I doesnt get into the IF statement above. If i add

Err.Number = 1

Then it does go into the IF statement. What am i doing wrong please? Do I need to setup / declare Err somewhere. I am new to this on error code.

Thanks
Matthew

Matthew Wilde
matthew@ukwebsite.com
 
Sorry, just found out why? I put the IF statement at the beggining of the code before the error was generated.

Sorry for the wasted post. I looked for ages. A rest away from the PC is needed I think.

Matthew Wilde
matthew@ukwebsite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top