is possible to use a between clausole...

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

is possible to use a between clausole...

Post by sal21 »

I dont know if is possible, in other case...

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"
I need to set the second BETWEEN on a diffrent mdb on c:\mydir\database1

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.

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: is possible to use a between clausole...

Post by HansV »

I don't understand what you mean by "set the second BETWEEN on a diff(e)rent mdb".
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: is possible to use a between clausole...

Post by sal21 »

HansV wrote:I don't understand what you mean by "set the second BETWEEN on a diff(e)rent mdb".
follow me...

...WHERE DATA_OPERAZIONE BETWEEN #" & Format(Me.DATE4.Text, "MM/DD/YYYY") & "# AND #" & Format(Me.DATE5.Text, "MM/DD/YYYY") & "#...

DATA_OPERAZIONE are present on tab_SI where point the actual CONN and on tab_SI on c:\mydir\database1

in this case the first condition Between point on CONN (DATA_OPERAZIONE BETWEEN #" & Format(Me.DATE4.Text, "MM/DD/YYYY") &) the second element of between point on tab_SI field DATA_OPERAZIONE on c:\mydir\database1 & Format(Me.DATE5.Text, "MM/DD/YYYY") & "#...

User avatar
HansV
Administrator
Posts: 78481
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: is possible to use a between clausole...

Post by HansV »

Sorry, that doesn't make sense to me.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4355
Joined: 26 Apr 2010, 17:36

Re: is possible to use a between clausole...

Post by sal21 »

HansV wrote:Sorry, that doesn't make sense to me.
OK... changed my method of selection.
tks.