I use this sql:
Code: Select all
SQL = "SELECT IMP_OPERAZIONE, NR_ASS, ASS, CONT, NR_CIRC, CIRC, COMMISS, ACC_CC, ADD_CC, NR_CDI, CDI, RESTO, COD, OPERAZIONE, MATR, SPORT, PRESENTATORE, NDG, RUOLO, ORDINE, DATA_OPERAZIONE, ORA_OP FROM tab_SI WHERE DATA_OPERAZIONE BETWEEN #" & Format(Me.DATE4.Text, "MM/DD/YYYY") & "# AND #" [b]& Format(Me.DATE5.Text, "MM/DD/YYYY") & "#[/b] AND SPORT='" & Me.SPORT3.Text & "' AND COD='" & RIGA & "' ORDER BY IMP_OPERAZIONE"
note:
I just have a jet4.0 conn opened named CONN thath point in the first BETWEEN condition
The structure (field name, table name, ecc...) of the 2 databases are exactllly the same.