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 
Looping through form controls
Scott 

15 years ago
As this excellent blog has much helped me in the past, i pose a new quandry!!

I have a form who's purpose is to calculate utilized unit hours. Tasks can go from 30 minutes to several hours. For simplicity sake, on a query (qryTaskTime) I have a calculated control which returns a task time start as an integer [tasktimestart]:(00 for midnight, 01 for 01:00, etc.), and then a calculated integer for [subtotalUHU]. UHU is industry speak for unit hours utilized. And if the task lasts 11 hours it will calculate and return 11.

For purposes of the loop, there is a primary key for eack task, and then a form with a date control and hr00, for midnight hour, and hr01 for 0100 hour etc. These are plain text boxes and I think the integer will serve the purposes nicely.

Also I should note that all of the text boxes on the form have a default value of 0.

I would like a loop that goes through all the text boxes (and to explain by example) if a task starts sometime in the 0900 hour it goes to textbox hr09 and the task takes 11 hours to complete, all the textboxes hr09, hr 10, .... hr20 are changed to 1.

When I get it to do that, there are several graphs that I can generate from this information.

I did forget to mention that this form frmUnitHours, is also tied to a table [with an amazing spark of originality] named tblUnitHours. Thanks in advance for all the help that you offer!

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/18/2026 12:41:32 PM. PLT: 0s