Results 1 to 4 of 4
  1. #1
    Ranger7913 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    18

    Auto-filling data

    I need help understanding if there is a way to add new data automatically to a table. I have a table titled "Logbook Table" This table captures an employees ID, a date ID (I have a separate table for just dates) and if turned in or not. I have a master employee table as well. I also have forms for both. I have it set up so that while operating with the "Employee Form" I can go to the logbook form for that employee and update if a log was turned in. I have a button to "add new". It provides a blank form. I have a drop down box which lists all of the dates from the "date table" and a yes/no box if it was turned in. Is there a way to allow a new form to automatically generate with the employee's ID? Because we capture 26 cycles of logs each year, I thought it was best to have that data in a separate table. Also, is there a way to automatically generate a new form with the next cycles date without having to manually enter all 284 employees every cycle? I can explain further if there is any confusion. Thanks for any help.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    First, don't generate a table for each cycle that's just.... a bad idea. You can identify cycles with a field on your log table that indicates the start date and end date of the cycle (I'm assuming it's a 2 week pay period we're talking about)

    Other than that it would help if there was some explanation (table diagram) of your structure that was more detailed than what you've posted.

    personally I'd have these:

    Employee Table (Sounds like you have one with a Primary Key (autonumber) field)
    Log Table (with a PK field of it's own and a FK (foreign key) to the Employee Table.

    The LOG table can contain the date range if the pay period or you can have a third table with the pay periods listed and a PK

    i.e.

    Code:
    tblPayPeriods
    PP_ID  PP_Start  PP_End
    1      1/1/2015  1/14/2015
    2      1/15/2015 1/28/2015
    etc..
    Then on your LOG table you would include the PP_ID as well as the Employee ID

    Finally if you are going to append a lot of data each cycle to your log table with some default values you should also have a 'confirmed' field that indicates the log has been accepted as accurate and complete.

    Now if you are on your employee form and you click your 'log' button and you want the 'log' form to come up to the appropriate person you can do that a number of ways and the ways you would accomplish it are based on how your form is set up.

    For instance:
    Are you using a bound or unbound form?
    Do you have a list box or combo box on the 'employee' form you can use to reference the correct employee number?
    Are you using a continuous or single 'employee' form

    Maybe a screenshot to help with that part of it.

  3. #3
    Ranger7913 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Oct 2014
    Posts
    18
    Thanks for your response. I have a Log table setup with three columns: Employee ID, Cycle End Date, and Received (yes/no). I created a Date table that lists all of the cycle end dates for a given year. The "Log" table is bound to the Log form. I have a relationship established between the Log table and the main Employee table. I use it to create queries and reports on missing logs. As it is structured now, each time a new employee is hired, they are added to the employee form. I have a button on that main form that takes me to a blank Log form. I have to manually input the employees ID number and select a date from the drop down box for each cycle because the data is being saved to the "Logbook" table. I am trying to see if there are any suggestions on how I could streamline this. As it stands now, I am going to have to manually enter all 284 employees ID number and cycle end date. To add a little to the confusion, As logs come in, we click the Yes/No button so we can update and create a report on which ones are missing. I have the report linked to the logbook table so if I have not added a cycle end date for that employee, they will not show up on the missing log report. I am fairly new to access but have learned a lot over the past few months. This forum has been the most beneficial. Thanks for your help.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    it seems to me you're overcomplicating this have you tried using a single form?

    here's a simple example using bound forms

    Ranger7913.zip

    look at the tables before you start to see there is only an initial period with an end date, no records in the log table

    then open the form, you should be prompted to add new periods.

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

Similar Threads

  1. Replies: 5
    Last Post: 08-28-2012, 03:23 PM
  2. Auto display name when filling form
    By mohiahmed in forum Forms
    Replies: 3
    Last Post: 01-22-2012, 02:35 PM
  3. Auto filling a form from table
    By JoScSM in forum Forms
    Replies: 1
    Last Post: 11-02-2010, 08:09 AM
  4. Auto Filling
    By tgavin in forum Forms
    Replies: 2
    Last Post: 08-02-2010, 10:47 AM
  5. Auto filling form fields
    By adamch29 in forum Forms
    Replies: 1
    Last Post: 07-25-2007, 06:22 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