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 Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
My alternative ComboBox
Gregory Clancey 
    
3 years ago
Here's a Form Control cluster that I use instead of a ComboBox, especialy if the number of selections offered is a mere 3 or 4. It also works better than a triple-state CheckBox or OptionButton too.

One CommandButton and two TextBoxes, a short and a long.

When focus lands on the CommanButton. I use repeated presses of the SpaceBar to loop through the options which are clearly displayed. Fortunately Focus stays on the ComandButton after each SpaceBar press. until "Tab" navigates off the Button to the next control in the order for mouse-free  operation. Box TextBoxes are locked and not in the tab order.

Only the TextBox displaying the numeric value "x_optionNumber" is bound to the underlying table (a Long Integer field). I use a Select Case block on the button's ONCLICK to effect the loop that replaces the "pre-code" value of [x_optionNumber] with its incremented or loop-back value. There is no value list. Instead the longer TextBox's DataSource is. . .

   "=Switch (x_optionNumber=0, "EE-NIE", x_optionNumber=0, "ME-NIE", x_optionNumber=0, "MY-NIE")

I find that it's fast, lightweight and with an economy of code making it simple to edit, resistant to bugs and quite stable to use.
Gregory Clancey OP  @Reply  
    
3 years ago
ERRATUM:

OOPS! To err is human (. . .as well as my standard operation)

The ControlSource for the longer TextBox should read . . .
   "=Switch(x_optionNumber=0, "EE-NIE", x_optionNumber=1, "ME-NIE", x_optionNumber=2, "MY-NIE")

This is why they won't let me work on the atomic bomb projects.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 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/2/2026 9:06:21 AM. PLT: 1s