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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Using Double Double Quotes
Jerry Fowler 
       
4 years ago
I am trying to open a specific report and need to use double double quotes as the ID is a string.  I thought I had double double quotes down but either not or I've been looking at it too long and don't see the obvious error.

MemID is a string field so I'm using the VBA code

DoCmd.OpenReport "Copy Of DuesNotice-SecondR", acViewPreview, "MemID="" & MemID & """""
Adam Schwanz  @Reply  
           
4 years ago
Just have the quotes in wrong spot, remember everytime you use a lone " you are opening or closing the statement, and "" is the same as ' which SQL uses for string values.

So you have "MemID=""" which turns into MemID='
Then at the end you have """" Which turns into '
MemID='MemID'

"MemID=""" & MemID & """"
Adam Schwanz  @Reply  
           
4 years ago
DLookup Has a good visual display with colors below the picture of what's going on in the double double quotes.
Jerry Fowler OP  @Reply  
       
4 years ago
Adam thanks for your quick reply.  I thought I had this same code in one of my first tries and when I substituted your code I still got a different report.  I deleted the whole line of code and tried again.  I had forgotten an additional comma after acViewPreview and I then got the record I wanted.  Thanks for the code and thanks for the extra set of eyes on the code.

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

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/3/2026 11:26:43 AM. PLT: 0s