Hi There, I want to devlop a report in my project in which i want the user to select a value from the combo box and the value will be passed to the crystal report to generate the report.

The code that i have been using is as follows



Private Sub cmdViewrpt_Click()
If cmbMemType.Text = "Faculty" Then
s = "{tab_member_type.member_type}='" & cmbMemType.Text & "' and {tab_issue_return.returned_on}='Outstanding'"
End If
If cmbMemType.Text = "Faculty" Then
s = "{tab_member_type.member_type}='" & cmbMemType.Text & "' and {tab_issue_return.returned_on}='Outstanding'"
ElseIf cmbMemType.Text = "Staff" Then
s = "{tab_member_type.member_type}='" & cmbMemType.Text & "' and {tab_issue_return.returned_on}='Outstanding'"
ElseIf cmbMemType.Text = "Others" Then
s = "{tab_member_type.member_type}='" & cmbMemType.Text & "' and {tab_issue_return.returned_on}='Outstanding'"
End If
cryOutstandingMem.RecordSelectionFormula = s
cryOutstandingMem.DiscardSavedData
Report.EnableParameterPrompting = False
Report.ParameterFields.GetItemByName("outstandingMem").AddCurrentValue cmbMemType.Text
Report.ParameterFields.Item(1).Value = cmbMemType.Text
CRViewer91.ReportSource = Report
CRViewer91.ViewReport

CRViewer91.Refresh
End Sub




Please Help me out
Thanking u in Advance
NIELSH VAKNALLI