By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

I keep receiving an error message in access

P: 1
after loading a table in csv format I get a pop up box saying "object variable or with block variable not set", why is this happening, and is my table loading correctly?
I would appreciate any help I can get.
thank you in advance,
I am using Access 2007
Aug 5 '10 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 107
Are you using code to load the table? If so, there may be an error in the code. I'd need to see the code to fix it.

Or does the message come up using the built in Import Excel button from the External Data tab? If that's the case there may be something wrong with the CSV file. I think this should fix the CSV file, but I don't use them often: Back up the CSV file, open it in Excel, then re-save it as a CSV file.
Aug 5 '10 #2

Expert Mod 15k+
P: 31,769
I'll post a copy below of instructions I often post to help people attach databases here for review. You needn't attach your database, but the points that go with it seem particularly relevant. The one about compiling the project jumps out ;)

When attaching your work please follow the following steps first :
  1. Remove anything not relevant to the problem. This is not necessary in all circumstances but some databases can be very bulky and some things do not effect the actual problem at all.
  2. Likewise, not entirely necessary in all cases, but consider saving your database in a version not later than 2003 as many of our experts don't use Access 2007. Largely they don't want to, but some also don't have access to it. Personally I will wait until I'm forced to before using it.
  3. If the process depends on any linked tables then make local copies in your database to replace the linked tables.
  4. If you've done anything in steps 1 to 3 then make sure that the problem you're experiencing is still evident in the updated version.
  5. Compile the database (From the Visual Basic Editor select Debug / Compile {Project Name}).
  6. Compact the database (Tools / Database Utilities / Compact and Repair Database...).
  7. Compress the database into a ZIP file.
  8. When posting, scroll down the page and select Manage Attachments (Pressing on that leads you to a page where you can add or remove your attachments. It also lists the maximum file sizes for each of the allowed file types.) and add this new ZIP file.
It's also a good idea to include some instructions that enable us to find the issue you'd like help with. Maybe some instructions of what to select, click on, enter etc that ensures we'll see what you see and have the same problems.

Welcome to Bytes!
Aug 6 '10 #3

Post your reply

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