CMontoro
Registered User.
- Local time
- Today, 07:10
- Joined
- Mar 26, 2005
- Messages
- 21
I've designed a form to show records about "Marks"
When I select option "All class" (gpoClase<>1) the report show results, but when I select the option " A class" (gpoClase=1) and enter a class, for example '10´ , it doesn´t show any result.
What's happening ?
I've attached the mdb file
This is the CommandBoton'code wich displays data:
---
Private Sub Informe_ClasesMes_Click()
On Error Resume Next
If IsNull(Me.cboClase.Value) And gpoClase = 1 Then
Cancel = True
cboClase.SetFocus
Else
Dim strWhere As String
If gpoClase = 1 Then
strWhere = "month([feref])= " & numes & " and year([feref]) =" & Me!añov
strWhere = strWhere & " AND val([cdclase]) = " & Me!cboClase
Else
strWhere = "month([feref])= " & numes & " and year([feref]) =" & Me!añov
End If
DoCmd.OpenReport "infClasesMarca", acPreview, , strWhere
DoCmd.SelectObject acReport, "infClasesMarca"
DoCmd.Close acForm, Me.Name
End If
If Err = 2501 Then Err.Clear
End Sub
---
Thanks for advance
Carlos
When I select option "All class" (gpoClase<>1) the report show results, but when I select the option " A class" (gpoClase=1) and enter a class, for example '10´ , it doesn´t show any result.
What's happening ?
I've attached the mdb file
This is the CommandBoton'code wich displays data:
---
Private Sub Informe_ClasesMes_Click()
On Error Resume Next
If IsNull(Me.cboClase.Value) And gpoClase = 1 Then
Cancel = True
cboClase.SetFocus
Else
Dim strWhere As String
If gpoClase = 1 Then
strWhere = "month([feref])= " & numes & " and year([feref]) =" & Me!añov
strWhere = strWhere & " AND val([cdclase]) = " & Me!cboClase
Else
strWhere = "month([feref])= " & numes & " and year([feref]) =" & Me!añov
End If
DoCmd.OpenReport "infClasesMarca", acPreview, , strWhere
DoCmd.SelectObject acReport, "infClasesMarca"
DoCmd.Close acForm, Me.Name
End If
If Err = 2501 Then Err.Clear
End Sub
---
Thanks for advance
Carlos