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
hi Alex, thanks again for your help. I am sure it will prove spot-on!
I guess it is important to mention that this will all happen in the background. The end result is a couple of pertinent graphs (all the calculations will imbedded.
So for program flow, I have an unmatched query between a times table and a task table. (each task has a host of about 11 pertinent times.)
So the first form is 1 combo box that pulls PC's from the unmatched query. After Update on this form opens my task time form, task time calulation query, and fills a couple of static controls, PC(primary key) and a date field (as dates will be crucial down the road).
Then, when the task time form opens, it will run this loop that I am trying to build. (I just realized that I should put a resume together for a government job, i have the automation made before we know the machine will run.) hahaha
At any rate... I was using the [tasktimestart] formatted as an integer, and then concatenated with "hr" to match the textbox control name.
the code is
Dim i as integer
Dim ctl as Control
Dim starttime as integer
Dim UHU as integer
Dim ComUHU as integer

Starttime= Dlookup("POSUnitHour", "qryTaskTime", "PCNumber="&Forms![frmUnitHours]![PCNumber])
UHU= Dlookup from same query-“ConUnitHours”
i= starttime
ComUHU=i+UHU

then the loop was:
for L= starttime to ComUHU
ctl=”hr”&Format(L,”00”)
ME.ctl=1
Starttime=starttime+1
Next L
End Sub

This doesn’t work, so I am going to try what you’ve got and plug it in

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/9/2026 9:23:36 AM. PLT: 0s