Hi everybody! My problem is: I'm trying to put a var (who contains some values from a multi selected list) in a DoCmd.OpenReport. Please help me! Thanks!
Dim crit As String
If (crit <> "" Then
crit = crit & " AND [C16-VEND]= forms!Form1![myListBox]"
Else: crit = crit & """ [C16-VEND]= forms!Form1![myListBox]"
End If
DoCmd.OpenReport "report1", acViewPreview, , "GetValue(crit)"
Dim crit As String
If (crit <> "" Then
crit = crit & " AND [C16-VEND]= forms!Form1![myListBox]"
Else: crit = crit & """ [C16-VEND]= forms!Form1![myListBox]"
End If
DoCmd.OpenReport "report1", acViewPreview, , "GetValue(crit)"