I'm trying to create an application that will display the records by entering the two DATES
but i'm having an error and it won't display the records.
I don't know if the DATE format is the problem or my code.

Code: Select all
on mouseUp
   DBConn
   SearchDates
end mouseUp
local tDatabaseID,sDatabaseID
local tSQL
command setDatabaseID pDatabaseID
   put pDatabaseID into sDatabaseID
end setDatabaseID
function getDatabaseID
   return sDatabaseID
end getDatabaseID
command DBConn
   put revOpenDatabase("ODBC", "Wbox", "TempDB",, )into tDatabaseID
   setDatabaseID tDatabaseID
   
end DBConn
Command SearchDates
   put getDatabaseID() into tDatabaseID
   put Field "Start Date" into tStartDate
   put Field "End Date" into tEndDate
   put "SELECT * FROM EODattr1 WHERE ACDate BETWEEN '"&tStartDate&"' AND '"&tEndDate&"';" into tSQL 
   put revDataFromQuery(tab,return,tDatabaseID,tSQL) into tList 
   set the dgData of group "dgEOD" to empty 
   
   repeat with x=1 to the number of lines of tList
      set the itemdelimiter to tab
      put item 1 of line x of tList into theDataA["A"]
      put item 2 of line x of tList into theDataA["B"]
      put item 3 of line x of tList into theDataA["C"]
      put item 4 of line x of tList into theDataA["D"]
      dispatch "AddData" to group "dgEOD" with theDataA,x
   end repeat
end SearchDates
hope you can help me
 
 