troubleshooting Question

Insert Into, 3134 syntax error

Avatar of mlcktmguy
mlcktmguyFlag for United States of America asked on
Microsoft Access
4 Comments1 Solution555 ViewsLast Modified:
I have a module I got from an EE contributor that I've been using for a while to calculated the size of each object (tables, forms etc..) in an Access DB.
I've used it many times on my Win XP Access 2003 MDB's and I'm trying to run it for the first time on my Access 2010, Win 7 Pro DB.

I'm getting a syntax error on the 'Insert Into' command.

This is the statement that throws the error:
 DoCmd.RunSQL "Insert Into ObjectSizes (Name, Type, Size) Values ('" & objName & "','" & strObject & "'," & FileLen(strDbName) - blankSize & ")"

I did a debug.print to see what the string it was building looked like and this is it:

Insert Into ObjectSizes (Name, Type, Size) Values ('frmConversion','Forms',135168)

I checked how it runs on my XP Access 2003 MDB's and it still works fine and creates exactly the same string for the 'Insert Into'

Any ideas>?
ASKER CERTIFIED SOLUTION
Hamed Nasr
Retired IT Professional

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros