473,378 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Payroll troubles

48
I have frmMain that takes in data about a particular event. Payroll information needs to be automatically calculated from this, but is stored in a different table. So, I included a subform frmPay, to remain hidden (as the user shouldn't be able to access it directly).

When the user puts in the length of time into frmMain, I can round it to the nearest 15 minutes just fine for frmPay. Now, when I want to multiply those hours by their hourly rate, I have two problems:

1) converting time into a multipliable number. I'm currently using this (keep in mind it's accessing a subform):
myTime (as double) = Hour(Me![frmPay].Form.[TotalHours]) + (Minute(Me![Payroll subform].Form.[TotalHours]) / 60)
This works, but I'm wondering if there's an easier way I'm missing.

2) The *rate* value that I need to multiply it by is stored in a completely different table, related by employee. I have no clue how to access the rate in tblEmployee given the employeeID in frmPay with VBA. I know I can just make another subofrm linked by employee that contains the rate, but this seems *really* wrong. Advice?

Also, I'm using the BeforeUpdate event to do the data transfer between frmMain and frmPay and for calculations. If anyone has any advice as to how to make this more efficient, and especially how to address #2 above, please let me know.

As always, I am greatly appreciative of everyone putting in time here to help others.
Aug 9 '07 #1
2 1305
isoquin
48
Once again I find I can't edit/delete my post for some reason....

ANYWAY! DLookup() seems to do the trick. If anyone has any advice as to the overall efficiency for this thing, it would still be appreciated.
Aug 9 '07 #2
Scott Price
1,384 Expert 1GB
Once again I find I can't edit/delete my post for some reason....

ANYWAY! DLookup() seems to do the trick. If anyone has any advice as to the overall efficiency for this thing, it would still be appreciated.
Sorry that this post appears to have gotten lost in the confusion :-(

Edit/Delete disappears after an hour I think it is...

As for the efficiency of your code, I don't see anything there that should cause major problems. If it ain't broke, don't fix it !! :-)

Regards,
Scott
Aug 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Randi | last post by:
Hi, Looking for some help with this payrool project I have for class. This is what the instructor asks for so far. I have it working without errors but am getting some funky numbers. I am not...
0
by: zexx | last post by:
Need some advise.... Payroll program Access97. Payroll is printed then posted to a hx table thro' a query with the payroll calculations that freeze that payroll's numbers for that period. The...
1
by: kgatchell2001 | last post by:
Hello, I am using Access 2002 to track payroll. I am trying to carry a person's Sick time accrued into the next record for an individual. I am a beginner with access. I am using the following...
1
by: cheungs7 | last post by:
Hi all, Wondering whether you can anyone help me. We have Sage Payroll (and accounting/payroll software), which has a MS Access database where the data is stored. Now I want to access the...
1
by: Akinyemi | last post by:
I am developing a payroll program.. The data generated will be saved in an Access Database. I want a situation whereby when an employee leaves the organization or retires, instead of deleting his...
8
by: John Sitka | last post by:
Hi, There are four pay types standard shiftpremium doubletime doubletimepremium each hour a person books can be one of these types
1
by: Akinyemi | last post by:
I have almost finished writing my Payroll Program. But I am wondering how the program can be used for different months. For example, after, say January 2007 Payroll, the user would want to prepare...
0
by: sajithamol | last post by:
In perspective of PeopleSoft what is the basic difference between the Pay roll of North America and Global payroll? Are there any possibilities that Global payroll applied to U.S.A?
4
by: jnce | last post by:
hi everyone! im a student and im trying to make a basic employee payroll system using ms access 2007. can anyone give me an idea on how to create a employee payroll system using ms access...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.