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 
Stuck
Gary 

16 years ago
While performing aircraft electronic testing / maintenance, error codes are collected from various electronic systems. The error codes are listed by system along with a 4 digit code IE 4C00. Now to decifer this code I have to break down each position into binary IE 4C00 is equal to 0100110000000000 binary. I successfully completed this by using 2 text boxes, one to enter the code and the other I use string concatenation and the the dlookup function. All this works fine, however here is my problem. I need to breakdown the 15 digit binary code and return the position (0-15) containing a 1. So basically 0100110000000000 = error code 1,4,5 (because position 1 4 & 5 all contain a 1). heres a quick example how I have everything layed out.

Combobox( chose my system ) - Ref SystemT
Textbox ( type in short code ) unbound
Textbox ( outputs binary 15 digit code )- concatenation & Dlookup - ref BinaryT
Listbox ( Use critera to filters error list by system and position number (0-15)) -ErrorT

BTW has the access image seminar been completed? would like to purchase.


Reply from Richard Rost:

Gary, that's a good one. I would create a custom function to figure out that error code. Something like this:

Public Function ErrorCode(BinaryCode As String) As String
    ErrorCode = ""
    For X = 1 To Len(BinaryCode)
        If Mid(BinaryCode, X, 1) = "1" Then
            If ErrorCode <> "" Then ErrorCode = ErrorCode & ","
            ErrorCode = ErrorCode & X - 1
        End If
    Next
End Function

Throw that in a module, and now you can call it from inside your forms, reports, and queries. Hope this helps.

Yes, the Imaging seminar is finished.

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: 6/1/2026 1:25:14 AM. PLT: 1s