Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Calculated Fields    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
text or number
Lyle Bailey 
      
2 years ago
for a query field
Expr1: Nz(DSum("[HOURSEARNED]","T-HOURS-EDUCATION-01","DATEEARNED>=Date()-30"),0)
output expr1=1
Expr2: Nz(DSum("[HOURSEARNED]","T-HOURS-EDUCATION-02","DATEEARNED>=Date()-30"),0)
output expr2=2
does this return number or short text?
tried adding expr1+expr2 it doesn't add it, it concatenates, IE. 1+2 = 3 but when I run the query it gives 12 like it was expr1 & expr2
Sami Shamma  @Reply  
             
2 years ago
Did you try to convert it to an integer with "CINT"?
Richard Rost  @Reply  
          
2 years ago
It's going to return whatever data type the original field is (technically a variant) so like Sami said you may need to cast it into an Int or Lng.
Lyle Bailey OP  @Reply  
      
2 years ago
thank you cint worked
when i created the table hoursearned was int
ran this Expr1: Nz(DSum("[HOURSEARNED]","T-HOURS-EDUCATION-01","DATEEARNED>=Date()-30"),0)
output expr1=1
it converted it into short text.
so, I did exprc1: cint ([expr1]) any way to cint on expr1?
Richard Rost  @Reply  
          
2 years ago
Just put the whole thing together:

Expr1: CLNG(Nz(DSum("[HOURSEARNED]","T-HOURS-EDUCATION-01","DATEEARNED>=Date()-30"),0))

I prefer CLNG to CINT if there's any way your value will go over 32,000.
Lyle Bailey OP  @Reply  
      
2 years ago
thank you I LOVE YOU
Richard Rost  @Reply  
          
2 years ago

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

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: 3/14/2026 10:33:20 PM. PLT: 1s