Results 1 to 6 of 6
  1. #1
    tazui1982 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    19

    Training Database for a medium size company

    Hi,
    I already started my first thread yesterday in Access subforum but decided that this would be the best place to ask for advise on Database design.
    My company is currently producing consumer electronics and we have around 1,000 operators performing certain tasks on daily basis. Database's main purpose is to allow supervisors (Line Leaders) to request training for operators if they're assigned to certain products and work processes. According to company's policy only line leaders can request training and only trainers can provide specific training then qualify operators to work at certain product/processes. JohnG and June7 in earlier thread already provided certain guidance so I came up with something like that in the attached DB.

    Username: Employee1
    Password: Password@1
    The reason I put login screen there so you guys can also give me advise whether I should have Login screen at all. From what I've learnt on Youtube, I must have login screen with username and password because I'd like to assign certain forms to certain people later on.



    I put TrainingRequestID_FK in frmTrainingRecord but failed to understand how to connect TrainingRecord and TrainingRequest, please help.

    I would also appreciate it if you could point out how to assign forms to users. Thanks
    Attached Files Attached Files
    Last edited by tazui1982; 09-11-2017 at 11:48 AM. Reason: minor edits

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    You're doing great!

    I made a few minor changes:
    RequestorID is a new field in tblTrainingRequest to indicate which employee is submitting the request. I put it on the training request form, have it automatically populated with the employeeID, and it cannot be edited.




    I put TrainingRequestID_FK in frmTrainingRecord but failed to understand how to connect TrainingRecord and TrainingRequest, please help.
    You have it right in the sample database.

    I would also appreciate it if you could point out how to assign forms to users. Thanks

    • New Module1 sets up global variables identifying the user and the associated permissions
    • the login form assigns values to the global variables based on the permissions assigned to the user who logged in
    • The Main Form enables or disables the action buttons according to what the current user is allowed to do. It does this in its On Open event. Try logging in as different types of user to see how the user type and/or permissions affect which buttons are enabled.


    Look at the VBA code in frmTrainingRequest, frmMain and frmLogin to get an idea of how you can work with permissions.

    As I said, you're doing great!
    Attached Files Attached Files

  3. #3
    tazui1982 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    19
    Thanks a lot for your help

  4. #4
    tazui1982 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    19

    Cool

    Quote Originally Posted by John_G View Post
    You're doing great!

    I made a few minor changes:
    RequestorID is a new field in tblTrainingRequest to indicate which employee is submitting the request. I put it on the training request form, have it automatically populated with the employeeID, and it cannot be edited.






    You have it right in the sample database.




    • New Module1 sets up global variables identifying the user and the associated permissions
    • the login form assigns values to the global variables based on the permissions assigned to the user who logged in
    • The Main Form enables or disables the action buttons according to what the current user is allowed to do. It does this in its On Open event. Try logging in as different types of user to see how the user type and/or permissions affect which buttons are enabled.


    Look at the VBA code in frmTrainingRequest, frmMain and frmLogin to get an idea of how you can work with permissions.

    As I said, you're doing great!
    I'm going through frmTrainingRequest at the moment and I have 1 problem: 1 ID can only register one time, if I click on AddRecord button, the new form doesn't load "Requested by: " and naturally I can't save the record. Could you please let me know which code I can use to keep having the same ID in "requested by" field with each new record.

    Another question I have is with frmTrainingRecord, right now information from frmTrainingRequest is not passing onto it, should I create a code to let it do so?

    Thanks
    Attached Thumbnails Attached Thumbnails frmTrainingRequest.JPG   frmTrainingRecord.JPG  

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    if I click on AddRecord button, the new form doesn't load "Requested by:
    That is easily fixed. You just need a bit of VBA code in the On Current event of the form:

    Code:
      If Me.NewRecord Then
        [RequestorID] = CurrentUser_ID
      End If
    This code runs every time you move to another record in frmRequestTraining. If that record is a new record, then populate the (hidden) control [RequestorID] with the current user number. The "Requested By" control will automatically show you the resquestor's name. A record can only be "new" once, so if another user views the data in that form, the user ID's will not change.

    Another question I have is with frmTrainingRecord, right now information from frmTrainingRequest is not passing onto it
    The only field the two forms have in common is the TrainingRequst_ID. If you make the bottom field (TrainingRequestID_FK) a combo box listing the uncompleted training requests, and bind that combo to the TrainingRequestID_FK field in tblTrainingRecord, that will be the link you need. If you want to display other data from the corresponding training request, it is not difficult - you just need a few unbound textboxes on the form, or maybe a popup read-only form.

  6. #6
    tazui1982 is offline Novice
    Windows 10 Access 2016
    Join Date
    Sep 2017
    Posts
    19
    Ok let me try those suggestions. Thanks

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

Similar Threads

  1. Replies: 3
    Last Post: 10-20-2016, 04:25 PM
  2. Help making attendance record database for Vol. Fire Company
    By Ryanm0085 in forum Database Design
    Replies: 6
    Last Post: 10-25-2015, 07:21 PM
  3. Database for Company's Output
    By cg98721 in forum Database Design
    Replies: 1
    Last Post: 06-15-2011, 07:10 AM
  4. International Shipping Company Database Design
    By chaienbungbu in forum Database Design
    Replies: 1
    Last Post: 02-13-2010, 01:31 PM
  5. Medium date permits
    By maxx3 in forum Database Design
    Replies: 4
    Last Post: 06-25-2009, 10:34 AM

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