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 
Creating a Global Modual
Brian Heintzberger 
      
8 months ago
Hello,
I am working on a database to track swim times and weather they received a certain time standard.  I have a form to enter the standards based on age group for the different events.  I am converting the times to seconds in order to be able to compare them easier or do math.  My question is I have a private sub to do this but I need it in 11 different places with all different field names.  How can I do this as a public sub with all the different field names?  See Screen shots of the form and the sub.
Brian Heintzberger OP  @Reply  
      
8 months ago

Brian Heintzberger OP  @Reply  
      
8 months ago

Brian Heintzberger OP  @Reply  
      
8 months ago
Thank you for your help
Kevin Yip  @Reply  
     
8 months ago
Create a global procedure that accepts a field name as the input, then outputs the seconds to the same field name plus "inSeconds" added at the end.  E.g.

Public Sub ConvertToSecs(ByVal InputFieldName As String)
     ...
     timeParts = Split(Me(InputFieldName, ":")
     ...
     Me(InputFieldName & "inSeconds") = Minutes * 60 + Seconds
     ...
End Sub

You still have to put this procedure in every AfterUpdate event, of course.
Brian Heintzberger OP  @Reply  
      
8 months ago
Cool thank you, i appreciate it

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 7:44:58 AM. PLT: 0s