INSERT INTO event (taskid, EventPrivate, AddedBy, EventNoTime, EventRtype, EventCatID, EventName, EventDescr, EventDate, EventDateEnd, EventAddDate, EventUpdateDate, EventRepeat) VALUES(#taskid#, #Private#, #Client.Cal_UserID#, #noTime#, #RepeatingType#, #Form.Cat#, '#TmpEventName#', '#Form.EDescr#', #StDate#, #EndDate#, #now()#, #now()#, #RepeatingEvent#) SELECT MAX(EventID) as theID FROM event INSERT INTO event (taskid, EventPrivate, AddedBy, EventNoTime, EventRtype, EventParentID, EventCatID, EventName, EventDescr, EventDate, EventDateEnd, EventAddDate, EventUpdateDate, EventRepeat) VALUES( #taskid#, #Private#, #Client.Cal_UserID#, #noTime#, #RepeatingType#, #getID.theID#, #Form.Cat#, '#Form.Ename#', '#Form.EDescr#', #StDate#, #EndDate#, #now()#, #now()#, #RepeatingEvent#) INSERT INTO event (taskid, EventPrivate, AddedBy, EventNoTime, EventRtype, EventParentID, EventCatID, EventName, EventDescr, EventDate, EventDateEnd, EventAddDate, EventUpdateDate, EventRepeat) VALUES( #taskid#, #Private#, #Client.Cal_UserID#, #noTime#, #RepeatingType#, #getID.theID#, #Form.Cat#, '#TmpEventName#', '#Form.EDescr#', #StDate#, #EndDate#, #now()#, #now()#, #RepeatingEvent#)