Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to SQL 2 Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
WhereStr SQL2
Ludwig Willems 
      
3 years ago
les 03:  don't I have to declare the WhereStr as a variable. I get an error message on that.    is there a module of declaration v variables at VBA level that I can check out.
Scott Axton  @Reply  
        
3 years ago
If you use Option Explicit, you can make variable declaration mandatory. I always use that anymore. I find that it helps me not have typos as bad.

Access doesn't require that you initialize your variables like some other programs do, but I tend to do that as well, just out of good practice. I want to know where my starting point is.


Option Explicit
Ludwig Willems OP  @Reply  
      
3 years ago
Then I think it would be appropriate to turn off Option Explicit for a while until I start with Developer1. I'm currently working on Expert 10 so I still have a long way to go.
Scott Axton  @Reply  
        
3 years ago
Actually Ludwig I would recommend just the opposite.  I find that it actually prevents errors.
If you don't declare a variable then Access automatically assigns it as a variant which I find can cause other issues.
Ludwig Willems OP  @Reply  
      
3 years ago
When I declare Dim WhereStr As String , I still get the error message that it has not been declared.  It's a string after all....or not ???
Kevin Robertson  @Reply  
          
3 years ago
Have you declared the variable in the correct place?

Scope

This thread is now CLOSED. If you wish to comment, start a NEW discussion in SQL 2 Seminar Lessons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

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: 4/13/2026 7:34:03 AM. PLT: 1s