Delete records from a Table based on the outcome of Form Update

txgeekgirl

Registered User.
Local time
Today, 14:00
Joined
Jul 31, 2008
Messages
187
I have a database were employees log all of their daily activities for a month out of the quarter. This information is parsed and sent to Medicare for verification of services provided.

I have a form named Update Staff. One of the Controls on Update Staff is a Delete cmd to be used if that staff person quits or is terminated during the Time Study period. It works really well in deleting that persons records except for those in the data table portion of the DB.

What I would like it to do as part of the VBA Module is look up records where [Forms]![Update Staff]![UserID] = [Time Study Daily Log].[StaffID] and delete the whole records for the Quarter where [Time Study Daily Log].[Quarter] = [Project Parameters].[Quarter] where [Project Parameters].[Active] = True.

I would appreciate any help in setting up the structure for this. :D
 
[Forms]![Update Staff]![UserID] = [Time Study Daily Log].[StaffID] and delete the whole records for the Quarter where [Time Study Daily Log].[Quarter] = [Project Parameters].[Quarter] where [Project Parameters].[Active] = True.

I would suggest you create a delete query and construct it using the logic you have set out above.
 

Users who are viewing this thread

Back
Top Bottom