Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Customized List Box
Timothy Schmidt 
    
2 years ago
I am trying to build a customized ListBox.  I have just two fields, FirstName and LastName..
I keep getting an error 13 Type Mismatch when I check the CheckBox labeled ShowLastName.  It
references the "CustomerList.ColumnWidth = CW" in my Private Sub RequeryList()
DetailsPrivate Sub RequeryList().
    Dim CW As String, RS As String, CC As Long
    CC = 1
    CW = "0"";"
    RS = "SELECT DataID"
    If ShowFirstName Then
        CC = CC + 1
        CW = CW & "0.7"";"
        RS = RS & ", FirstName"
    End If
    If ShowLastName Then
        CC = CC + 1
        CW = CW & "0.7"";"
        RS = RS & ", LastName"
    End If
    RS = RS & " FROM Data'
    CustomerList.ColumnCount = CC
    CustomerList.ColumnWidth = CW **Here is what it references.**
    CustomerList.RowSource = RS
End Sub
Private Sub Form_Load()    
     RequeryList
End Sub
Private Sub ShhowLastName_AfterUpdate()
     RequeryList
End Sub
Private Sub ShowLastName_AfterUpdate()  
     RequeryList      
End Sub


Any thoughts'
Tim Schmidt
Adam Schwanz  @Reply  
           
2 years ago
I'm sure its the double quote. 0.7""
Try taking that out completely, access is probably smart enough to just use 0.7;

Otherwise try 0.7"""" Double Double quotes
Kevin Robertson  @Reply  
           
2 years ago
You are missing an 's'.
Should be ColumnWidths, not ColumnWidth.
Adam Schwanz  @Reply  
           
2 years ago
Good eye Kevin. I forgot that was different
Timothy Schmidt OP  @Reply  
    
2 years ago
Thank you so much. that did the trick.

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

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 11:42:06 AM. PLT: 1s