Computer Learning Zone CLZ Access Excel Word Windows

Geddy once joked, "you're the only guy I know who rehearses to rehearse!"

-Neil Peart
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Database Security Seminar    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Runtime Error 438
Neal Groeling 
     
6 years ago
Richard,

I've been working my way through this seminar. Enjoying it very much.

At the 7:25 mark or so, I have entered the following:

Private Sub Form_Current()

    Dim ctl As Control
    
    For Each ctl In Me
        If ctl.ControlType = acTextBox Or ctl.ControlType - acComboBox Then
            ctl.Locked = True
            ctl.BackColor = RGB(200, 200, 200) 'gray
        End If

    Next

End Sub

When I try to open the form, I receive a "run-time error 438 Object desn't support this property or method." for the ctl.Locked = True.

I am using Access 365.
Richard Rost  @Reply  
          
6 years ago
Looks like you've got a minus sign in the second half of your OR condition instead of an equal sign.
Neal Groeling OP  @Reply  
     
6 years ago
Richard,
Ignore my previous post. With my challenged eyesight, I missed a typo. Hit a - instead of = in the second ControlType

Anyway, enjoying the seminar.
Richard Rost  @Reply  
          
6 years ago
I hear ya, Neal. I know all about challenged eyesight now! I've been blind in one eye since February and my good eye is super blurry. I'm going to leave this post here if it's OK with you, however, as a lesson to other users... sometimes the craziest of error messages can come from the simplest of errors.
Neal Groeling OP  @Reply  
     
6 years ago
I agree! Leave the post! I know I read through the code multiple times and never saw the error -- until I closed my eyes and rested them for a bit. Your eyesight challenges remain in my prayers.
Richard Rost  @Reply  
          
6 years ago
Thanks. I appreciate that.

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

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: 5/7/2026 1:39:53 AM. PLT: 2s