K
Kevin
Any help would be appreciated,
Does anyone know how I can evaluate 2 different tables i.e. JobPurchases and
JobParts, and insert a record in the tables using the following code?
If there is already a record in the two tables I do not want to insert the
record. if a record does not exist then insert record.
DoCmd.RunSQL "INSERT INTO JobPurchases (WorkOrderID, EmplID
)" _
& "SELECT WorkOrderID, EmplID " _
& "FROM [Work Orders] WHERE WorkOrderID = " & Me.WorkorderID
DoCmd.RunSQL "INSERT INTO JobParts (WorkOrderID, EmplID )" _
& "SELECT WorkOrderID, EmplID " _
& "FROM [Work Orders] WHERE WorkOrderID = " & Me.WorkorderID
Thanks, Kevin
Does anyone know how I can evaluate 2 different tables i.e. JobPurchases and
JobParts, and insert a record in the tables using the following code?
If there is already a record in the two tables I do not want to insert the
record. if a record does not exist then insert record.
DoCmd.RunSQL "INSERT INTO JobPurchases (WorkOrderID, EmplID
)" _
& "SELECT WorkOrderID, EmplID " _
& "FROM [Work Orders] WHERE WorkOrderID = " & Me.WorkorderID
DoCmd.RunSQL "INSERT INTO JobParts (WorkOrderID, EmplID )" _
& "SELECT WorkOrderID, EmplID " _
& "FROM [Work Orders] WHERE WorkOrderID = " & Me.WorkorderID
Thanks, Kevin