|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Filter Report with combo boxes in form
Hi to all,
I have the following code in the Filter Command Button The problem is that the Data Type of one of the combo boxes is Date while for the second is Number (autonumber) so I am having problems with data types when filtering [code] Dim strSQL As String, intCounter As Integer For intCounter = 1 To 2 If Me("Filter" & intCounter) <> " " Then strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "]" _ & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & "" _ And "" End If Next If strSQL <> " " Then 'Strip Last " And " strSQL = Left(strSQL, (Len(strSQL) - 5)) 'Set the filter Property Reports![infReporte_Pedidos].Filter = strSQL Reports![infReporte_Pedidos].].FilterOn = True [code] I know it has to do with the CHR(34) section, but I do not know how to fix it. Thanks in advance. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Filter Report with combo boxes in form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|