Type Mismatch on Imports

jsic1210

Registered User.
Local time
Yesterday, 22:10
Joined
Feb 29, 2012
Messages
188
Hello,
I am getting really frustrated with a common error in VBA imports. It has happened with spreadsheets and text files I have users importing. An error message pops up "Type Mismatch." But the import appears to work correctly. So I added code that On Error, if error Like "*Type mismatch*" continue to next step. Now the user gets a longer error message: "The expression On Click entered as the event property setting produced the following error: Type mismatch." Again, the import still works, but this message is annoying! The even stranger thing is that I do not get this error message on my machine. Just the other users. Does anyone know what could be causing this?
Thanks,
Jeff
 
generally the issue is that you are importing to a certain field type, and access/excel determine between them that the data is not of the type.

often this occurs because a column ought to be text, but the first few rows are numeric - so access assigns a numeric column and then rejects a lot of data. The easiest solution is to add a row 2 to the spreadsheet with (say) the word "text" in the text columns - to force them to be treated as text

hope that makes sense.

you should get an importerrors table for rejected data conversions.
 
Gemma,
Thanks for the quick reply. Because it's still importing properly (just with error messages), there's no import errors table. For this same reason, I'm not sure the text/numeric fields would be the problem.
The users that are having problems are still running Windows XP, while my manager and I (who aren't getting error messages), have been upgraded to Windows 7. So, I think that might have something to do with the problem. For now, I'll let the users deal with this minor annoyance, and see what happens when they get upgraded.
Jeff
 
it might be a references issue, then

is the dbs "open" to code manipulation or locked?

If open, try compiling it, and/or checking the code references.
(if you are in the same building, try the .db database, even if you usually use a .de databse)
Might even be as simple as something like folder privileges on the c:\ folder.
 
It is not open to manipulation, as it is a DE file. The DB file that houses the tabes is in the same folder, but password protected. The DB file that I use to make changes to the objects is in my personal folder. I just use that and save over the DE file when I'm ready for my changes to go into production.

I've moved the DB file into that folder to test it, and it works just fine for those users. But I don't want the users to have access to the code.
 

Users who are viewing this thread

Back
Top Bottom