Results 1 to 2 of 2
  1. #1
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93

    Arrow Foce new record in related table?

    What I have:
    tblPersonal
    -EmployeeNumber (PK)
    -LName
    -FName
    -MI
    -JobCodeID (FK)

    tblJobCode
    -JobCodeID (PK)
    -EmployeeNumber (FK)
    -JobCode
    -JobDesc

    frmDataEntry
    -Employee Number
    -LName
    -FName
    -MI
    -sbfJobCode

    sbfJobCode
    -JobCode
    -JobDesc

    What I am trying to do:


    When a new hire hits HR, their personal information is entered in the db, but not the job code. The new hire then reports to his/her supervisor who assigns a job code. I need to figure out a way to force the creation of a new related record in tblJobCode with null information when the HR rep enters the personal info.

    The problem:
    In my opinion, the problem lies somewhere between laziness and incomptence. There have instances where HR does not set the new record in sbfJobCode and the new hire's supervisor doesn't do it either. This presents an issue for payroll in that payscale is driven by job code. It would make my life considerably easier if the new record in tblJobCode was created automatically so I can easier determine which employees are not assigned a primary job code, as each employee should have a primary, secondary, and alternate.

    Thank you in advance for your time and help. If I am not being clear enough with my description of the problem, please let me know.

  2. #2
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Looking at your supplied Table layout, doing what you want shouldn't be that difficult, especially since you've separated the Primary Key field from the Job Code itself (however, doing this does have it's own drawbacks, anyway. . .).

    What you can do is program your Form so that, when a new employee is entered, a "default" Job Code is assigned automatically (say Code -1 or something). Then make it the HR employee's job to change the Job Code from -1 to something else.

    That way, you can do a simple search for any -1 Job Codes to find out if any need to be assigned.

    P.S.
    Honestly though, it's probably be better to force HR to assign a Job Code when they first enter the employee's data. That way you're forcing them to have the new Job Code in the system before they can even enter anything.

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

Similar Threads

  1. Replies: 6
    Last Post: 09-01-2010, 03:12 PM
  2. Replies: 2
    Last Post: 06-20-2010, 06:54 PM
  3. Table related to multiple tables by single ID
    By MrTumnus in forum Access
    Replies: 1
    Last Post: 11-17-2009, 02:05 PM
  4. Move a record from one table to another table.
    By botts121 in forum Programming
    Replies: 4
    Last Post: 06-25-2009, 12:53 PM
  5. Split a table into related tables
    By triley01 in forum Database Design
    Replies: 1
    Last Post: 03-12-2009, 02:38 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