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 
Help with diff between dates
Debora Paglierini 

2 years ago
Hi all,

I have a database about employee file management (human resources). Each employee is identified by his serial number ("EmployeeID" fileld).

There is the login system (for admin: admin as username and admin as password; for normal user: user1 as username and user1 as password) and you have the list of all registered employees.

A normal user can access each file only if it is previously approved, otherwise he or she must request it.

Once a file is opened, there is the main screen about the personal data and basic information of each employee, and below the sub-files, which are the most important part of everything.

Each hiring/termination period has a startdate and (possibly) a enddate, and I wanted to calculate each period actually worked. More or less through VBA code I was able to get the individual periods worked, the partial totals (of the sub-files) and finally the global total worked by the employee.

However, there are several problems and now I'm stuck:

- Meanwhile the partial total queries don't consider the days and I don't know why;

- Then I have problems with showing the record count in the tabs, it always gives me errors;

- But now my big problem is about calculation of periods worked. For example, if everything works and I have all the totals I want, then I will no longer be able to modify the records because using that (very complex) query then blocks the subform and I can no longer add new periods, nor modify existing ones or even delete them.

It's obviously a huge and messed up code, furthermore if I use the query (which necessarily has union, various joins, etc.) then I can't longer edit the records of the subform, therefore I can't modify, add or delete individual work periods.

So is it better to create another form linked to the subform to be able to add or edit records from there? Or is there another way to have the work periods easily?

Or also make period calculations completely separate but still visible near each record?  

In any case in a way that is "simple" for me to understand, because if in the future I have to modify or add other functions I wouldn't want them to cause conflicts.. :(

I quickly translated the attached file into English (I'm Italian) so I apologize for the errors.
In my access file (in Italian) for example the subforms linked with the queries (with calculated periods) are clearly visible, but the records are not updateable. In the English file version perhaps I didn't change some controls but the problem of the non-updatable record would still remain.

Link: https://we.tl/t-iaSf4PGNTb

Thank you very much in advance

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/7/2026 6:21:25 AM. PLT: 1s