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 
Naughty VBA Code
Nathan Shepard 
      
4 years ago
I am having trouble with this VBA code.  The fieldname is RecordActive.

I have it currently displaying A Check Mark.  I want it to show a red check mark if the record in-active in the box.  If record is active then a green check mark.  Currently it does show a green check mark
Nathan Shepard OP  @Reply  
      
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
Are you referring to this? Check Box Color

Where is the color coming in? What is your conditional formatting?
Nathan Shepard OP  @Reply  
      
4 years ago
Yes I am, I used a toggle box with a No for use theme with A"P" and wingding 2 font.  A "P" in WingDing 2 font is a check mark.

It takes me 5 days to get money into my paypal account.  Be patient for the future.

Nathan Shepard OP  @Reply  
      
4 years ago

Adam Schwanz  @Reply  
           
4 years ago
What is the PayPal reference about?

You could do this with all VBA as well. Something like

Private Sub ToggleBtn_Click()
    If CheckBoxName = True Then
    ToggleBtn.BackColor = vbWhite
    ToggleBtn.ForeColor = vbRed
    ElseIf CheckBoxName = False Then
    ToggleBtn.PressedColor = vbWhite
    ToggleBtn.PressedForeColor = vbGreen
    End If
End Sub
Nathan Shepard OP  @Reply  
      
4 years ago
Adam:

I will try your code.  I was told to switch to a forum for purchasers of that sort template.  So I thank you for your help.  I will continue to try my query and menu for sorts.  The other way.  I eventually will get it to work.  Thank you again.  The comment about PayPal deals with funding your tip jar.   I have to work on it.
Adam Schwanz  @Reply  
           
4 years ago
Oh no worries, yea if you use that code in the click event and in the on current event of the form you should always have the colors you want.
Nathan Shepard OP  @Reply  
      
4 years ago
Adam:

The code is below.  I believe the code is commonly known.  By publishing it here.  The tech help is free on the website.  

is two lines of code.  I modified it slightly.  Your code could be added.  I just don't know where to put it.  So I will work it in and see what happens.  Jeff

Private Sub Form_Current()
IsActive_AfterUpdate
End Sub

Private Sub IsActive_AfterUpdate()
If isACTIVE Then
isACTIVE.Caption = "RECORD IS ACTIVE"
Else
isACTIVE.Caption = "RECORD NOT ACTIVE"
End If

End Sub

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/6/2026 4:05:27 PM. PLT: 1s