hi
I have a append query that looks like this
[QUOTEINSERT INTO [all events] ( EventID, InstanceID, EventDate, EventDescrip, EventStart, RecurCount, PeriodFreq, Machinetype )
SELECT qryEventCartesian.EventID, qryEventCartesian.InstanceID, IIf([tblEventException].[EventID] Is Null,IIf(([qryEventCartesian].[PeriodTypeID] Is Null) Or ([qryEventCartesian].[PeriodFreq] Is Null) Or ([qryEventCartesian].[InstanceID] Is Null),[qryEventCartesian].[EventStart],DateAdd([qryEventCartesian].[PeriodTypeID],[qryEventCartesian].[InstanceID]*[qryEventCartesian].[PeriodFreq],[qryEventCartesian].[EventStart])),IIf([tblEventException].[IsCanned],Null,[tblEventException].[InstanceDate])) AS EventDate, qryEventCartesian.EventDescrip, qryEventCartesian.EventStart, qryEventCartesian.RecurCount, qryEventCartesian.PeriodFreq, tblEvent.MachineTool
FROM (((qryEventCartesian LEFT JOIN tblEventException ON (qryEventCartesian.InstanceID = tblEventException.InstanceID) AND (qryEventCartesian.EventID = tblEventException.EventID)) LEFT JOIN ltPeriodType ON qryEventCartesian.PeriodTypeID = ltPeriodType.PeriodTypeId) LEFT JOIN Machinetool ON qryEventCartesian.EventID = Machinetool.MachineID) LEFT JOIN tblEvent ON Machinetool.MachineID = tblEvent.EventID
WHERE (((qryEventCartesian.EventID)=[ENTER EVENT ID]))
ORDER BY qryEventCartesian.EventID, qryEventCartesian.InstanceID;
][/QUOTE]
what can happen is that the user could append some of the data twice
is it possible to create a macro that would look at the " eventid " and the " eventdate" and not append any of the records that are the same
thanks
steve
I have a append query that looks like this
[QUOTEINSERT INTO [all events] ( EventID, InstanceID, EventDate, EventDescrip, EventStart, RecurCount, PeriodFreq, Machinetype )
SELECT qryEventCartesian.EventID, qryEventCartesian.InstanceID, IIf([tblEventException].[EventID] Is Null,IIf(([qryEventCartesian].[PeriodTypeID] Is Null) Or ([qryEventCartesian].[PeriodFreq] Is Null) Or ([qryEventCartesian].[InstanceID] Is Null),[qryEventCartesian].[EventStart],DateAdd([qryEventCartesian].[PeriodTypeID],[qryEventCartesian].[InstanceID]*[qryEventCartesian].[PeriodFreq],[qryEventCartesian].[EventStart])),IIf([tblEventException].[IsCanned],Null,[tblEventException].[InstanceDate])) AS EventDate, qryEventCartesian.EventDescrip, qryEventCartesian.EventStart, qryEventCartesian.RecurCount, qryEventCartesian.PeriodFreq, tblEvent.MachineTool
FROM (((qryEventCartesian LEFT JOIN tblEventException ON (qryEventCartesian.InstanceID = tblEventException.InstanceID) AND (qryEventCartesian.EventID = tblEventException.EventID)) LEFT JOIN ltPeriodType ON qryEventCartesian.PeriodTypeID = ltPeriodType.PeriodTypeId) LEFT JOIN Machinetool ON qryEventCartesian.EventID = Machinetool.MachineID) LEFT JOIN tblEvent ON Machinetool.MachineID = tblEvent.EventID
WHERE (((qryEventCartesian.EventID)=[ENTER EVENT ID]))
ORDER BY qryEventCartesian.EventID, qryEventCartesian.InstanceID;
][/QUOTE]
what can happen is that the user could append some of the data twice
is it possible to create a macro that would look at the " eventid " and the " eventdate" and not append any of the records that are the same
thanks
steve