![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
FROM syntax not recognizing table
Good day all, I am hoping someone can shine the light on my mistakes.
I have an ADO code the runs in excel pulling info from an MS access DB. The issue is when I pull FROM a table that has one word it works fine but if the table has more than one word with a space etc it does not work. If i replace the "Profiles 3-4" below with one word like "Helmet" it works but i have so many tables in my DB renaming all to a single word is not realistic. Any help would be apprecited. BTW im not new to excel VBA but access i am ver much a novice. Thx, RKeev This is the selection of code where it errors: VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 11:19 AM
Local Date: 05-23-2013 Location:
|
|
|
|
#2 |
|
|
If possible, rename the table to a single word with no spaces, punctuation marks, etc. ... begin the name with a letter, and use only letters, digits, and the underscore character for the rest of the name.
If you must keep that name, surround it with square brackets to avoid confusing the database engine. VBA:
VBA tags courtesy of www.thecodenet.com
|
|
Local Time: 09:19 AM
Local Date: 05-23-2013 Location:
|
|
|
|
#3 |
|
Moderator
|
hansup makes an excellent point. It's a good idea when setting up your database to not include spaces in the name of anything - tables, fields, queries, forms ...
I'd suggest you do some reading on the Leszynski/Reddick naming conventions - it's a good habit to get into, and makes your database much easier to maintain. We are what we repeatedly do. Excellence, therefore, is not an act but a habit. Aristotle |
|
Local Time: 02:19 AM
Local Date: 05-24-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


