Hi
I have three comboboxes which have different values and one command button.i select the item from one of the combobox and press command button to open its correspodning report. but when i come back the item is still selected in the combobox and if i select other item in the second combobox and press command button it still opens the previous report bcos the item is till selected in it.
how to deselect it and run only one combox at a time and clear the values selected?
i wrote this code for it doesnt work
If IsNull(Me.cmbClient_ID.Column(0)) = False And Me.cmbClient_ID.Column(0) <> "" Then
DoCmd.OpenReport ReportName:=stDocName, View:=acPreview, Wherecondition:="OOS.Client_ID1 = " & cmbClient_ID.Column(0) & " or OOS.Client_ID2= " & cmbClient_ID.Column(0) & " "
rst.Close
Me!cmbClient_ID.Column(0) = ""
End If
If IsNull(Me.cmbAnalyst_ID.Column(0)) = False And Me.cmbAnalyst_ID.Column(0) <> "" Then
DoCmd.OpenReport ReportName:="OOSAnalyst", View:=acPreview, Wherecondition:="OOS.Analyst1_ID = " & cmbAnalyst_ID.Column(0) & " or OOS.Analyst2_ID= " & cmbAnalyst_ID.Column(0) & " "
rst.Close
Me!cmbAnalyst_ID.Column(0) = ""
End If
If IsNull(Me.cmbSample_Number.Column(0)) = False And Me.cmbSample_Number.Column(0) <> "" Then
DoCmd.OpenReport ReportName:="OOSSampleNumber", View:=acPreview, Wherecondition:="OOS.OOS_ID = " & cmbSample_Number.Column(0) & " or OOS.OOS_ID= " & cmbSample_Number.Column(0) & " "
rst.Close
Me!cmbSample_Number.Column(0) = ""
End If
psl help me
thank you
I have three comboboxes which have different values and one command button.i select the item from one of the combobox and press command button to open its correspodning report. but when i come back the item is still selected in the combobox and if i select other item in the second combobox and press command button it still opens the previous report bcos the item is till selected in it.
how to deselect it and run only one combox at a time and clear the values selected?
i wrote this code for it doesnt work
If IsNull(Me.cmbClient_ID.Column(0)) = False And Me.cmbClient_ID.Column(0) <> "" Then
DoCmd.OpenReport ReportName:=stDocName, View:=acPreview, Wherecondition:="OOS.Client_ID1 = " & cmbClient_ID.Column(0) & " or OOS.Client_ID2= " & cmbClient_ID.Column(0) & " "
rst.Close
Me!cmbClient_ID.Column(0) = ""
End If
If IsNull(Me.cmbAnalyst_ID.Column(0)) = False And Me.cmbAnalyst_ID.Column(0) <> "" Then
DoCmd.OpenReport ReportName:="OOSAnalyst", View:=acPreview, Wherecondition:="OOS.Analyst1_ID = " & cmbAnalyst_ID.Column(0) & " or OOS.Analyst2_ID= " & cmbAnalyst_ID.Column(0) & " "
rst.Close
Me!cmbAnalyst_ID.Column(0) = ""
End If
If IsNull(Me.cmbSample_Number.Column(0)) = False And Me.cmbSample_Number.Column(0) <> "" Then
DoCmd.OpenReport ReportName:="OOSSampleNumber", View:=acPreview, Wherecondition:="OOS.OOS_ID = " & cmbSample_Number.Column(0) & " or OOS.OOS_ID= " & cmbSample_Number.Column(0) & " "
rst.Close
Me!cmbSample_Number.Column(0) = ""
End If
psl help me
thank you