Hi
I have a textbox (C4) has to be a criteria in the report "RELAT_GENERICO".
The field in the report is numeric, so he receives 1 or 2 or 3 ...
I need to "pass" my string ("19 or 20 or 21") to be the criteria but she passes like string or like a complex string.
How to do it?
CODE
Dim QUOTE As Variant
Dim stDocName As String
Dim i As Integer
Dim where, C10 As String
Dim c11 As Variant
QUOTE = ""
where = "=18"
If IsNull(C4a) Then
'This is for no-choice. To be all the records!!
For i = 19 To 20
where = where & " ou =" & i
Next i
C4.Value = QUOTE & where & QUOTE
MsgBox (C4)
Else
C4 = C4a
End If
stDocName = "RELAT_GENERICO"
DoCmd.OpenReport stDocName, acPreview
Thanks
I have a textbox (C4) has to be a criteria in the report "RELAT_GENERICO".
The field in the report is numeric, so he receives 1 or 2 or 3 ...
I need to "pass" my string ("19 or 20 or 21") to be the criteria but she passes like string or like a complex string.
How to do it?
CODE
Dim QUOTE As Variant
Dim stDocName As String
Dim i As Integer
Dim where, C10 As String
Dim c11 As Variant
QUOTE = ""
where = "=18"
If IsNull(C4a) Then
'This is for no-choice. To be all the records!!
For i = 19 To 20
where = where & " ou =" & i
Next i
C4.Value = QUOTE & where & QUOTE
MsgBox (C4)
Else
C4 = C4a
End If
stDocName = "RELAT_GENERICO"
DoCmd.OpenReport stDocName, acPreview
Thanks