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!

import error message

Status
Not open for further replies.

supervi

MIS
Mar 22, 2003
61
0
0
CA
I have some of the users of my database import excel sheets.
Sometimes when they import an excel sheet they get the following error.

"not all of your data was succesfully imported. Error descriptions that are associate with rows can be found in table..blah blah"

I dont want them to see this error. I know why this error appears. Their are a few cells that are blank when the import the data so it tosses them aside. Does anyone either know what i can do so that the users wont see this message and get scared?

Is their an error code i can capture?


If you need more information, the users import an excel sheet. They let access determine the primary key, all they do is click next next next.


Thanks in advance
 
If you want to totally disregard this error message then use On Error Resume Next in your sub module and you will be fine. I would question why you don't want the users to know that all their data did not make it into the table. That seems very dangerous to me given the prospect of missing records. There are many other ways to go about this, such as writing code to drop incomplete records into a seperate table, changing the message to something more meaningful by trapping the error number, etc.

HTH

Regards
Rod
 
Would you happen to know where/how i could find the error number?

 
The On Error Resume Next will only work if the error is trappable. If the error is trappable, then inside the error handler, investigate the Err object, particularly, the .Number property and the .Description property.

You might also want to take a look at your error handling setting. From the VBE, or the IDE if you prefer, click on Tools->Options and select the General Tab. On that screen you'll see the various error trapping options.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Supervi, I have a list of access and jet errors with descriptions that I use in my error routines. Send me an email to rkasnick@yahoo.com and I will return it as an attachment. It is in xls format but you can import that easily into an Access table.

Regards
Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top