tansfer data from one table to another (1 Viewer)

jarry

New member
Local time
Today, 22:15
Joined
Aug 2, 2022
Messages
2
I have two table 1 employeeies 2transfer 3employies family
I want when anyone of my employee transfer from my company to other I click the button and give a date of tansfer and all data of employee transfer to transfer table and all family of employee become disable.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:15
Joined
Feb 19, 2013
Messages
16,685
you cannot disable records in a table. You can set flags and use code in a form to disable. Rather than moving a departing employee for one table to another, just set the date of transfer in a field in the employees table. This is your flag to disable.

I assume your employee form has a subform for family so the code in the form current event would be something like

familysubformname.enabled=not isnull(transferdate)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:15
Joined
Feb 19, 2002
Messages
43,518
You have three tables listed, not two. I'm not sure what business process you are trying to model. If an employee leaves your employ, why would you need a separate table to record the "transfer"? Why would you not just use a column for TerminationDT and another for TerminationReason? You can easily use code to prevent updates to the family subform when an employee's TerminationDT is not null as CJ suggested.
 

Users who are viewing this thread

Top Bottom