if (! DB_GetLBItem (hWndDriverList_DriverBox, P3_CURRENTROW,
                     0, szDriverID ) )
   return 0;
   
strcpy (szQuery, "Driver NJOIN Trip RESTRICT (DriverId = ^");
strcat (szQuery, szDriverID);
strcat (szQuery, "^) PROJECT (Destination, TripDate)");

if (! DB_CreateDerivedTable (hSession, "DTV",
                              "DriverTrips", szQuery ) )
   return 0;

 hTable = DB_OpenTable (hSession, "DriverTrips" ) ;
if (hTable)
    DB_TableToListBox (hSession, hTable,
                        hWndDriverTrips_TripsBox, "", TRUE ) ;
   
DB_CloseTable (hSession, hTable);
DB_DropTable (hSession, "DriverTrips");

