Results 1 to 8 of 8
  1. #1
    visidro is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    23

    Help with payroll form

    I am a little green with access need help with our payroll form.

    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.

    Your help is much appreciated.
    victor

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Should not save the employee name to payroll table, only employee#.

    Use a combobox with columns for the desired fields. Then code in the combobox AfterUpdate event can populate payroll table fields by referencing combobox column index. Index begins with 0.

    Me![# of students] = Me.comboboxname.Column(2)
    etc.

    BTW, advise to avoid spaces and special characters/punctuation (underscore is exception) in naming convention. Better would be EmpNum or Emp_Num.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    visidro is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    23
    Not sure how to exactly code this in the afterupdate event.

    Here is what my combobox with columns looks like:
    SELECT Employees.EmployeeID, Employees.FirstName, Employees.LastName, Employees.BillingRate, Employees.active FROM Employees WHERE (((Employees.active)=0)) ORDER BY Employees.FirstName;

    I need to get the firstname and billing rate from here.

    Can you help me create the event procedure please.
    thank you

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Why do you want to save name parts? That is duplication of data. I can understand saving the rate so that when the rate changes in the future the historical records are not changed.

    BillingRate is in the 4th column so index is 3

    Me!Rate = Me.comboboxname.Column(3)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    visidro is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    23
    I know ... I have reports and invoices already printing gathering all the data from one table. Much work to redesign all the reports and invoices.

    I get a syntax error as soon as I choose an employee in the combobox (called: employee Name)

    Private Sub Combo32_AfterUpdate()
    Me![employee rate] = Me.[employee Name].Column(3)
    End Sub

  6. #6
    visidro is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    23
    Compile Error: "Method or data member not found"

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Your combobox is named Combo32 not [employee Name].
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    visidro is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2013
    Posts
    23
    Works great
    thank you so much !!!!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help with Designing Payroll Database
    By bgwool in forum Access
    Replies: 1
    Last Post: 04-04-2014, 03:53 PM
  2. Adding rolling sums to a payroll db
    By snipe in forum Database Design
    Replies: 2
    Last Post: 12-02-2013, 09:55 AM
  3. Payroll calculations
    By Rogue in forum Programming
    Replies: 5
    Last Post: 07-10-2013, 10:34 PM
  4. Problem with Module for Payroll
    By burrina in forum Modules
    Replies: 5
    Last Post: 10-22-2012, 04:28 PM
  5. Employee info in Payroll form
    By ismalee in forum Forms
    Replies: 4
    Last Post: 06-30-2012, 05:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums