Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Developers    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
INSERT INTO SQL inserts a spac
Gary Becker 
     
3 years ago
I have a SQL INSERT INTO statement that is adding a space after the text string EMPLOYEE. Is there anything wrong with my SQL string that is making it include a "space" at the end?
Gary Becker OP  @Reply  
     
3 years ago

Alex Hedley  @Reply  
           
3 years ago
Dim MySQL
MySQL = [above statement]
Debug.Print MySQL
DoCmd.RunSQL MySQL


See the outcome in the Immediate Window.
Kevin Yip  @Reply  
      
3 years ago
Hi Gary, all your single quotes seem to have a space next to them.  Try removing those spaces by...

Changing this:  ' "
To this:  '"

Changing this:  " '
To this:  "'

Changing this:  " ' "
To this:  "'"
Gary Becker OP  @Reply  
     
3 years ago
Alex,
I haven't worked with the Debug and the Immediate Window. Does Richard cover that somewhere in his Developer Lessons?
Gary Becker OP  @Reply  
     
3 years ago
Kevin,
I took the spaces out between the single and double quotes on this field--and it WORKED!! I had looked at that before and wondered. Somewhere I had read that "normally" Access strips out leading and trailing spaces. I have that syntax in other code, but for some reason this time it was causing a problem. Thanks so much!!
Alex Hedley  @Reply  
           
3 years ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developers.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 9/29/2026 8:32:54 PM. PLT: 0s