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 
Conditional Formatting
Steven Dull 
    
5 years ago
Trying to figure out the Syntax.  In Conditional Formatting to determine if a number in a field is even. Tried "Mod 2=0" made sure I have square brackets around field name Etc...I cant figure this out. Now my brain hurts, lol Thank you for any advise, anyone could give me.
Robert Stoner  @Reply  
    
5 years ago
I think it is ([FieldName] Mod 2) = 0
Scott Axton  @Reply  
        
5 years ago
The syntax for MOD is:   (Number)  MOD  (Number)  See Glossary:  MOD

To use conditional formatting with a field you would choose "Expression Is"
In the expression box you would enter the expression as
              [FieldName] MOD 2 = 0

So if you were looking at FamilySize from the Sample Template it would be:

       [FamilySize] Mod 2=0  

Note - you need the brackets ( [ ) and ( ] ) even if your field name doesn't have spaces.

Then choose the formatting you want for that condition.

Steven Dull OP  @Reply  
    
5 years ago
I give up, Access is just to sensitive...LOL (Just Kidding)   I changed the code from "Mod"  To "MOD"  all caps and it worked.. It's the little things that ya gota pay attention to. Thanks Scott
Steven Dull OP  @Reply  
    
5 years ago
This may actually be a glitch in my system.  when I typed with lower case it gave me syntax error.  When I typed in all caps it accepted it and then changed it back to Mod  I went back in and deleted and tried with lowercase again to get that error and it did not happen.  go figure, thanks again for your help
Scott Axton  @Reply  
        
5 years ago
Access is not case sensitive.  Don't know what it was unless to hit m0d and not mod?  (zero)
Who know?
If I have something that just isn't working and I know it should, the first thing I do is sut down Access and restart.  sometimes a restart of the computer too.  Clear out the memory.
Steven Dull OP  @Reply  
    
5 years ago
More than likely it was me, I would have put money on it, that I typed it correctly. However, Next time I get something goofy like this, I will reboot,  Good Idea.  Thanks again you guys are the best!

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 9:14:33 PM. PLT: 1s