Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2005
    Posts
    7

    Lookup or list field: how Do I not show all records

    I created an employee database with a table that has my employees in it. I split the database (reg. file and be file) to make transferring easier. Of course in the nature of business I will lose employees. I do not want to delete an employee because if I want to reprint an old time card the past employee will not show up if deleted.

    How can I make it so when an employee leaves the company I can still keep him in the employee table but when the form selects from the table ans shows all the employees in the timesheet form, the past employees name(s) will no longer appear?

    The only way that I will see the old employee(s) is if I reproduce an report from the past or if I go into the table itself.

    Hope I explained it correctly.

    Thanks,

    Scott Munkirs

  2. #2
    StepUP is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Dec 2005
    Posts
    99
    Create a Boolean (Yes/No) field in the table, lets say you call it "Terminated".

    Then make the record source of the form a query which has a Where clause that says "[Terminated]=False"

  3. #3
    wasim_sono is offline Advanced Beginner
    Windows XP Access 2013 64bit
    Join Date
    May 2005
    Location
    Pakistan
    Posts
    73
    Hi all

    Its a good idea to create a boolean field. Actually I'm facing the same problem. but I think diffrent. Is it possible that We use a boolean field in table specify about the employee status either IN or OUT. and on a Transaction form there is a button called 'Delete Record'. When user press this button, some code will execute, that first backup a table and then delete that record. this process can maintain two table 'Backup' and 'Current' table. I hope u understand it. If so please help me for writing the code.

    Thanks.

    Wasim

  4. #4
    Join Date
    Aug 2005
    Posts
    7

    still not sure how to do

    Step,

    I created the entry in the employee table called "active". I made it a yes/no choice.

    anyway you could give an example of how to write the code and do i create a query or do i do it in the form filed?

    Basically, say I have 5 employees and when I hit the field in the form a drop down menu with all 5 names show up. I choose a name and continue on. I do this over and over again until I have all 5 employees completed.

    Now say 1 employee quits, now I have only 4 employees. I want the quit employee still in my table so I can generate reports in the past with him still in it but for current and future entries I would like the 4 remaining active employees to be shown in the form.

    Thanks again,

    Scott Munkirs

  5. #5
    StepUP is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Dec 2005
    Posts
    99
    No code should be required. Just create a query something like:

    Select * From Employees Where [Active]=False

    Use that as the record source for the form, and/or the row source for the drop down.

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

Similar Threads

  1. Data won't show up in table field
    By texzen123 in forum Forms
    Replies: 3
    Last Post: 11-26-2009, 11:20 AM
  2. Lookup
    By neon'00 in forum Forms
    Replies: 2
    Last Post: 04-14-2007, 01:19 PM
  3. Replies: 1
    Last Post: 03-15-2007, 03:38 PM
  4. Lookup Tables
    By JoeBio in forum Database Design
    Replies: 1
    Last Post: 09-01-2006, 07:34 AM
  5. Replies: 5
    Last Post: 05-02-2006, 11:25 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