473,322 Members | 1,188 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,322 software developers and data experts.

Error Handling in Access to Display Object Causing Error

Hello Everyone,
I am receiving a "Error 446 - Object doesn't support named arguments", but I would like to see which object is actually causing the error. Is there any code I can add to my error handler that will display the object or function causing the error?

thanks in advance
Matt
Oct 8 '13 #1
1 872
ADezii
8,834 Expert 8TB
The Source Property of the Err Object will return string expression specifying the name of the object or application that originally generated the error. You can use in an Error trap as such:
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdTest_Click()
  2. On Error GoTo Err_cmdTest_Click
  3. 'Code here
  4.  
  5. Exit_cmdTest_Click:
  6.   Exit Sub
  7.  
  8. Err_cmdTest_Click:
  9.   MsgBox Err.Description & vbCrLf & "Error Source: " & Err.Source, _
  10.          vbExclamation, "Error in Excel Transfer"
  11.     Resume Exit_cmdTest_Click
  12. End Sub
Oct 8 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: CSDunn | last post by:
Hello, I need some assistance with error handling in an Access 2003 Project form. The project is has a data source connection to a SQL Server 2000 database. The main form is named...
4
by: Big Dave | last post by:
Does anyone have suggestions on how to best handle errors in business objects that are part of a business layer? For example: Public Class Person Private _name as string Public Property Name...
1
by: michaeltorus | last post by:
Hi I'm currently designing a new web application in .Net. I've pretty covered everything, apart from error handling. There seems to be a few different way to do this, but something I've read...
1
by: GS | last post by:
Any points of what would be the good error handling design for application? User error handling in Application_OnError and throw() new errors on conditions through the code? I'd like utlimiately to...
2
by: DCC700 | last post by:
VS 2005 Converted Header causing error when publishing After converting from Visual Studio 2003 to 2005, I have had several issues with a header that is used throughout the project. The...
1
by: pob | last post by:
>From a form I have some code that calls 4 modules frmMain 1 mod 2 mod 3 mod 4 mod If mod 1 experiences an error the error handling works fine within mod 1 and writes out the error to a...
3
by: getintanked | last post by:
<script language="javascript" type="text/javascript"> function budgetview() { if (document.form1.txtSubject.value == "Weddings") { document.getElementById(BudgetDiv).style.display='block'; } }...
2
by: karu | last post by:
Hello All of u Plz help me regarding some problem related c#.net I have two forms form1 and form2 at the load of form1 i call another form2 form1_load() {
2
by: LeoK | last post by:
After finally completing my database I was ready to transfer it to our client, but when the access database was opened, everything works great, except for the SEND_EMAIL part, whenever any code that...
7
by: JFKJr | last post by:
Hi! I am a new beginner to MS Access VBA, I wrote the following VBA code in Access which deletes blank columns and rows in excel file. But, the code works fine for sometimes and sometimes it displays...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.