>SELECT msg.* >FROM MESSAGES.DB msg >WHERE (msg.ErrorLevel >= :ErrorLevel) > AND (msg.XDate >= :DateFrom) > AND (msg.XDate <= :DateTo) >Any ideas why Date and Time can't be used in the SQL ???? They're SQL keywords. Try msg."Date" -- Aaron Scott-Boddendijk Jump Productions (07) 838-3371 Voice (07) 838-3372 Fax --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz