Create A Payroll Record That Collect Some Information From Another Table

Oct 22, 2014

I would like to create a payroll record that collect some information from another table. In other words:

-I have an employee.
-I have a payroll table.
-I would like to get some of the values from the employee table written to the payroll table when a new record is entered.

The form would look some thing like this:

Three boxes:

Employee: [ ] (table query to find name) # of students [ ] #of class minutes [ ] (value list with 3 choices)

When the SAVE button is pressed a record would be written to the payroll table with:

The payroll table would look like this:
payrolid#, employee#, employee, # of students, # of class minutes, rate, date

The employee#, employee and the rate would come from the employee table.The # of students, # of class minutes and date would come from the payroll form.

View Replies


ADVERTISEMENT

Collect Information A Year Back

Aug 12, 2005

I have a database that keeps track of employees absences and tardies but after a certain amount of time is the data valid. I want to be able to type into my text box a date and have the query collect all infromation a year back. I know how to do it if I was just using the current date but how do I pull the information from a date a user can input?

In the date field I have the following:
=[form]![selectdate]![date]< 365
I've even tried [form]![select]![date] - 365

Can someone help me out? :)

View 2 Replies View Related

Trying To Create An Automatic Payroll Form

Apr 7, 2008

Hello,

I am basically doing FORM to automatically figure out my stylists commission pay, based on 5 levels of sales and 3 different pay levels, that I will cut and paste in a table from my POS system.

3 Total Tables.
tbl_Employees, with the headers ID, Name, Payroll ID, Comm_Level.
tbl-Current Year with the headers ID, Payroll ID, Name, Service Sales.
tbl_Comm with the headers ID, CommLow, CommHigh, Level1, Level2, Level3

In a query, Qry_Years, I have Payroll ID, linked between the tbl_Employees and tbl-Current Year.

I am close in a FORM to getting this to work, unless DLookup is the wrong why to go about this.

This is not correct, but gives you an idea of what I am trying to do. In a FORM text box (called framePayrollIDLookup) I have
=DLookUp("Level1","tbl_Comm",[tbl - Current Year.Service Sales] & " between [CommLow] and [CommHigh]").
This pulls up the correct pay percent for level1 employees, but i need to change out Level1 to something variable.
This also doesn't work, but gives you an idea of my though process.
=DLookUp(" " = framePayrollIDLookup,"tbl_Comm",[tbl - Current Year.Service Sales] & " between [CommLow] and [CommHigh]"), but this doesn't work.

I might be way off base on how to do this, but I am trying. Thanks for any help.
Chris

View 14 Replies View Related

Accessing Information From A Table Record Using Codes....

Jun 19, 2006

Hi all,

I've got this simple thing.. which I couldn't do and stuck for a long long time.. I have done some programming in a few languages, but not in SQL or VBA and I quite confused about programming styles that VBA and SQL accepts.

I'm currently working in Microsoft access and the thing I'm stuck on is retriving field value from a record and writing into another record on the same table.

For example the table "Table-users" looks like the following:

ID Name Year Month Date
1 Steven 1979 9 18
2 Jeremy 1977 10 22
3 Eslynn 1988 10 10

I've built a form that contains two lables (combobox), "ReplaceMe" "LoadMe" and a command button. Which end user could choose which record to load and which to replace.

I wish to copy Year, Month and Date from LoadMe into ReplaceMe without effecting the Replace me ID and Name.

The VBA, SQL code i've got looks like.
-----------------
'Command_Click is the tigger button to active the following code.
Private Sub Command37_Click()

'Below is an example of what I wanted to do field by field. However, in the real
'environment, I needed to move about 20 odd field into another object. I'm not sure
'to use Append or Update Query
Dim UpdateSQL As String
Dim text1 As String
Dim text2 As String
Dim text3 As String

'this loads the string containt-the Name of the object-into text1.
'this line works fine, arr.. other ones don't.......
text1 = Me!ReplaceMe
text2 = Me!LoadMe
'Load the month of the LoadMe.
text3 = Table![Table-users = text2].month

'Loads the SQL instruction into UpdateSQL
'Table-table is a table, containing several objects and fields.
UpdateSQL = "INSERT INTO [Table-users].text1( [Day], [year], [month] ) " & _
"SELECT Table-users.Day, Table-users.year, Table-users.month" & _
"FROM Table-users" & _
"WHERE (((Table-users.Name)='ReplaceMe'));"

DoCmd.RunSQL UpdateSQL

End Sub--------------------
Well the obvious, the above code doesn't run.
If LoadMe = Jeremy, ReplaceMe = Steven, the above code should return:

ID Name Year Month Date
1 Steven 1977 10 22
2 Jeremy 1977 10 22

Making Steve's Year, Month and Date field the same as jeremy

======================

What I think i'm confused about is when do I use [ ] ( ) ! .

Like... if I wanted to read the field value of "Date" from the object from the "Name" in combo box "LoadMe", what should I write?

ie, if the combo box "LoadMe" contains Eslynn. The end result should be 22.

Many thanks

View 2 Replies View Related

Modules & VBA :: Looping Through Records To Collect Data And Write To New Table

Jun 27, 2013

I am the first to admit I struggle with looping through records.

I am trying to loop through a table and collect external income data and write it to a new table.

My issue may be the way the table is laid out. ???

The attached pictures show the tables. The tblExtInc is where the data are. I am trying to create a table that looks like tblExtIncYr that shows each year and separate entries by item.

How would I loop through tblExtInc and grab ex:$2000 every year for upto 100 years but only get the $1000 for year 6,7,8 only?

View 2 Replies View Related

Auto-create Record In A Table

Mar 13, 2007

I need to make Access automatically create new records in a table for me.

Just for example:-

Table #1 has 2 fields

PersonID (autonumber)
PersonData (text)

Table #2 has 3 fields

ID (autonumber)
PersonID (number)
MoreData (text)

The database user creates a new record in Table #1 using a form.

I need the database to automatically create a field in Table #2 and fill in PersonID, taking the value from the autonumber field of the same name in Table #1.

The MoreData field can be left blank. I don't need that filled in automatically. I just need a new record to be created automatically in table2 with the PersonID field filled in with the most recently created autonumber.

Help massively appreciated.

View 14 Replies View Related

Modules & VBA :: Create New Record In Another Table

Jun 24, 2015

I'm trying to create a new record in another table and copy the value of two fields in the current table's record to the newly created record.

View 6 Replies View Related

Forms :: Create One Record In One Table And Multiple In Another

Oct 8, 2014

I have two tables which are in a one-to-many relationship (the example I am dealing with is a mother and her children).

I want one form for the mother, with fields such as date of birth, and when you click Add Record I want the mother table to be updated with the new record.

However on this form I also want a field for "number of children" and when the Add Record button is clicked, not only does the table containing all the mothers get a record added, I would like XX records added to the children table where XX is the number of children entered into the form. These should have separate IDs but retain a common field that identifies the mother.

View 2 Replies View Related

Create New Record & Pass Autonumber To Separate Table

Mar 10, 2008

I have a form, frmSub, that contains the combo box comProducts. I also have two tables, Products and PurchaseDetail. Both tables have the field ProductID.

I want comProducts to create a new record in the Products table, using the input in a field called Product and then to use the value of ProductID to create a new record in the PurchaseDetail table. Ie, so the PurchaseDetail table has a record that links to another record in the Products table via the feild ProductID.

I hope I was semi-clear.

View 4 Replies View Related

Tables :: Create A New Key For Each New Record Added In Child Table With ID

Aug 22, 2014

Table has a relationship with master table. Joined on TractID primary table - auto number, TractID child table - number. This works as it should when adding a new record.

What I am trying to do is create a new key for each new record added in the child table with an ID that looks like this: TractID.A, TractID.B, TractID.C etc. for each new record added in the child table. if so where do I look, how to accomplish it?

View 6 Replies View Related

Tables :: Create A New Field In One Table Whenever A Record Is Added In Another

Feb 6, 2013

I am wondering if it is possible to automatically create a new field in one table whenever a new record is entered in another table. The name of the field would be the primary key entry of that new record.

I have one table (table 1) in which each record corresponds to a particular mouse with a unique ID number, and each field is the ID number of a particular genetic marker. The table overall shows what genotype (+ or -) a mouse has at each marker.

In the other table (table 2) the primary key of each record is the ID number of a genetic marker, and the fields are several different bits of information about the marker (e.g. what chromosome it's on, its location on the chomosome, etc.)

I would like to have it set up so that if I enter a new genetic marker in table 2 a field named after its marker ID will automatically appear in table 1. Is there a way to do this?

View 7 Replies View Related

How Can I Create A Form Where You Can Enter Information And It Searches The Database.

Nov 11, 2004

Hello,

Does anyone know how I can create a form which asks for the name or lastname of the customer and does a search throuout the database and brings up all that customers informtation. And if their is more than one thats are the same you can switch through them untill you find the right one.

Thank you

View 2 Replies View Related

General :: Create Duplicate Entry On A Table And Then Edit New Or Old Record

Sep 2, 2013

I am trying to create a duplicate of a certain record in a table so that the user can then edit the new record - or old record even as it doesn't matter - as long as one of them is original. The idea is that any revisions / changes are stored the user may of made.

View 2 Replies View Related

Queries :: Create Query Where User Will Enter Information In Boxes?

Jun 26, 2014

I am trying to create a query where a user will enter information in boxes (any combination) on a form and a query will bring up the joined information from 4 different tables but I do not know where to start with the relationships on the query let alone the best method to search.

To start it off I have attached a db with the tables and the form I want the user to enter the search criteria into as well as my attempt at a query.

View 3 Replies View Related

Modules & VBA :: Event Information - Deleting Record Creates A Blank Record

Sep 8, 2013

I have a form set to the table Client Information with a subform set to the table Event Information. Client Information has a one to many relationship to Event Information.

There is a button that deletes the current record in Client Information--also deleting the related records in Event Information--then closes the form. The code works fine but a blank record in Event Information is apparently being created before the form closes.

Here's the VBA that I'm using:

Private Sub CmdDelReturn_Click()
Dim CmdDelReturnMsg As String
CmdDelReturnMsg = MsgBox("Delete event & client then return to front?", vbYesNo + vbDefaultButton1, "Delete and Return?")

[Code] ....

It's not a big deal because the button won't be used often and I can manually go into the table to delete the blank record. But if there's a simple solution to prevent this that would be nice.

View 3 Replies View Related

Queries :: Cartesian Table - Create Multiple Copies Of A Record To Use For Printing Labels

Aug 5, 2013

I am using a cartesian query to create multiple copies of a record to use for printing labels.

Here's my query that produces the cartesian result:

SELECT tblCount.CountID, tblDeliveryOrders.DeliveryOrderNum, CurrentCY.Deliveryorderlineitemnum, CurrentCY.Quant, CurrentCY.UOM1, tblContainerSizeCodes.SizeCode, tblContainerTypeCodes.TypeCode, CurrentCY.WasteDescription, tblEtidDodaac.EtidDodaac, CurrentCY.ETIDDocNum, CurrentCY.Pounds, tblEPAWasteCodes.[EPAWasteCodes(1B)]

[Code] ....

This works just fine in creating the desired result - EXCEPT I don't get all the records.

When I remove the 'cartesian table', and right join everything, then I get the correct results. If I keep everything as-is and reintroduce the cartesian table, then I get an error about there being an ambiguous outer join.

View 3 Replies View Related

Population Current Record With Information From Next Sequential Record

Apr 14, 2007

I need to write a query which populates an empty field in the current record with information from a specific field in the next sequential record. Any ideas?:confused:

View 3 Replies View Related

Forms :: How To Create A Form That Can Edit Or Create A Record

May 13, 2014

I am trying to create a form to enter data in a table. I would like to make it pull in info from a switchboard. If the record already exists I would like it to find it and allow me to edit the info. If the record doesn't exist I would like to be able to add a new record with the data input. What is the best way to accomplish this?

View 1 Replies View Related

Payroll Help

May 3, 2006

I am trying to develop a simple payroll. I have already developed three tables named tblEbmployee, tblPayment, tblDate. These are related with one to many between tblEmployees and tblPayment and one to many between tblPayment and tblDate. I dont need much calculations in the system. I will add salaries in tblPayments of the employees manually (as there is no set formula relating to the salary an employee). What i need is:
To make a form which uses tblemployee for each month salary
To carry the previous month salary data to next month without adding date for each employee indiividually. (is there a way to change month once that applies to all employees, keeping the record of previous month ) Do i need to add some other table to keep record of previous month payments and a table keeping record of rate of salary
yours
Arshad Slatch

View 7 Replies View Related

Payroll System

Sep 27, 2005

Hi All,

Need your expert advise. Is it ok to develop a simple payroll system using MS Access or do i need switch to Visual Basic?

Also, is there anybody can help what tables do i need to produce a payroll system, i.e. tblEmployee.


Thanks,

19Summer95

View 3 Replies View Related

Payroll Calculation

Dec 6, 2005

I am trying to type a code based on 1 & 2 criterias. However, I am having a problem on the first criteria because it is adding 8 hours when it shouldn't. Can someone help to either fix my code or write a new one? Thank you very much!

Criteria 1: If the day_of_wk is 1, calculate time-reg_time/60, If the day_of_wk is 1 and time is less than 0, calculate time-reg_time/60+24

Criteria 2: If the day_of_wk is 2, calculate time/60, If the day_of_wk is 2 and time is less than 0, calculate time/60+24

My code: pre: IIf([day_of_wk]="2",[time]/60,IIf([time]<0,([time]-[reg_time])/60+24,([time]-[reg_time])/60))

View 4 Replies View Related

Payroll Form

Jul 8, 2005

Hey there,

I have a form that has 7 days (Mon, Tue, Wed, Thur, etc...). The time is formatted like 08:00AM. Under each of those controls I have something that uses the expression: =(((([Sunday End Time]-[Sunday Start Time])*24)*60)/60), which if the hours were 08:00AM - 04:00PM, would give me 480, and then I convert it to hours (8). I have all these fields defaulted to 12:00AM to 12:00AM. I have another box that totals all these fields and uses the expression: =([SUH]+[MH]+[TU]+[WH]+[TH]+[FH]+[SAH]). These boxes are all of the results of End time-Start time. Now the problem. I have a payrate field on the form that looks at the hours worked, so I needed to separate overtime from straight. I have a box that looks like this: =IIf([Hours Worked]>"40",40,([Hours Worked])). The hours worked box is the result from the sum of SUH+MH+, etc...The problem is, each time I have any hours in there less than 10, it will return a crazy result. If I only enter 8 hours, it enters in the hours worked box: 40 hours. If I add 2 more hours, it fixes itself. What is the problem. I would be happy to send the file over, or ANYTHING to get this to work.

Sincererly,

Raymond

View 2 Replies View Related

Payroll Dilemna

Jul 29, 2005

Hello excellent helpers,

Thanks first of all for the responses I always get on here.

Question: There are several number fields on my form that are calculate fields, which I will show later what the expression is, that are not rounding off to 2 decimals as I am asking it to. How do I fix this?

The expression: =(((([Wednesday End Time]-[Wednesday Start Time])*24)*60)/60). This is a control box located under two fields (Start time and End time). The fields are formatted as 08:00AM.

So if I did 08:00AM to 05:20PM, the result would be 9.333333333....This does not mean much for the day as it adds up to be only cents, but over the week it becomes dollars. If the actual number was 9.33, it would be ok. No use in explaining that, you all get the idea.

View 2 Replies View Related

Employee Payroll

Oct 28, 2005

I'm trying to use a query to calculate the payroll for all the employees but it won't work. The two tables I have are 'Employees' and 'Employee Payroll'. In the 'Employee Payroll' table there are three fields- Employee ID, Days worked and Earnings. I need to calculate the sum of the earnings field but it just displays a blank list of records when I try it.
Can anyone help?
Thanks

View 6 Replies View Related

Calculate Payroll In Order Database

Mar 22, 2007

I have an order database Access 2000 for an inspection company, tblInspectors, tblOrders, tblCustomers, I want to be able to calculate inspector pay within order database. Each inspector is an independent contractor, so it just needs to calculate percentage, for each inspection performed and total for pay period. Each inspector is paid a different percentage, which is stored in tblInspectors. Payroll is paid every two weeks . . . I've been trying to figure out the best way to do this ... :confused: Any advise be greatly appreciated.:confused:

View 4 Replies View Related

Forms :: Create List Box To Only Display Information From Another Form Related To Current Form

Mar 20, 2014

What I would like to do is create a list box that will only display the information from another form that is related to the current form.So I have a form call Equipment Catalog and that form is related to Equipment features 1 to M relationship and the Equipment Features is related to a Features form M to 1.

So what I want to do is display all the related equipment features in a listbox that is related to the current PK of that form.So if there is only one feature on one form the list box will only display that one item however is there is 6 features on another it will display all 6.I have been trying SQL and Queries but I still can't get it to work.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved