Hi everybody.
I'm doing a job in access 2007 with a db MySQL.
In one form I need to filter 4 box (2 are ID and 2 are date).
For this form I did a query (select *) and after I use the key "filter".
So, I don't have problems with the 2 ID but when I try to filter the date I occured in an error: (Error run-time '3464').
The Code that I wrote is the following:
Private Sub bCerca_Click()
DoCmd.RunCommand acCmdRefresh
Dim Filtra As String
If ccPuntoMisura <> "" Then
Filtra = Filtra & " AND id_PuntoMisura = " & ccPuntoMisura
End If
If ccObis <> "" Then
Filtra = Filtra & " AND id_Obis = " & ccObis
End If
Filtra = Mid$(Filtra, 5)
Me.Filter = Filtra
Me.FilterOn = True
End Sub
Now I have txtBox1 with the beginning date and txtBox2 with the finish date. I tried with between date1 and date2 but doesn't work...
Do you have any suggestions?
Thanks a lot and sorry for my english...
See ya
I'm doing a job in access 2007 with a db MySQL.
In one form I need to filter 4 box (2 are ID and 2 are date).
For this form I did a query (select *) and after I use the key "filter".
So, I don't have problems with the 2 ID but when I try to filter the date I occured in an error: (Error run-time '3464').
The Code that I wrote is the following:
Private Sub bCerca_Click()
DoCmd.RunCommand acCmdRefresh
Dim Filtra As String
If ccPuntoMisura <> "" Then
Filtra = Filtra & " AND id_PuntoMisura = " & ccPuntoMisura
End If
If ccObis <> "" Then
Filtra = Filtra & " AND id_Obis = " & ccObis
End If
Filtra = Mid$(Filtra, 5)
Me.Filter = Filtra
Me.FilterOn = True
End Sub
Now I have txtBox1 with the beginning date and txtBox2 with the finish date. I tried with between date1 and date2 but doesn't work...
Do you have any suggestions?
Thanks a lot and sorry for my english...
See ya