• Just checking if true (Access2003)

    Author
    Topic
    #452678

    Quick question.
    Does using this code means if Forms!RetReports!cmbLB IS NULL – show me everything???

    If Not IsNull(Forms!RetReports!cmbLB) Then
    strWhere = “BusinessName =” & Chr(34) & Forms!RetReports!cmbLB.Column(0) & Chr(34) & _
    ” And [Region]=” & Chr(34) & Forms!RetReports!cmbRegion.Column(0) & Chr(34)

    End If

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1118290

      It depends on how strWhere is used, but the answer is most probably “yes”.

      • #1118292

        This code is placed on Click event of the button that running the Report.

        I am questioning only because when I have not selected any values – 200 pages Report comes up and shaking all up.
        I can click on scroll bar and it will stop – than if I need to go to the next page – it is shaking up again. So I can never see IF this Report ran correctly.
        Odd but happens all the time when I ran large Reports.

        Thanks so much.

        • #1118293

          If you’d rather avoid opening the report without any restriction on the records, you can use

          If IsNull(Forms!RetReports!cmbLB) Then
          MsgBox “Please select something in the Business Name combo box.”, vbExclamation
          Exit Sub
          Else
          strWhere = “BusinessName =” & Chr(34) & Forms!RetReports!cmbLB.Column(0) & Chr(34) & _
          ” And [Region]=” & Chr(34) & Forms!RetReports!cmbRegion.Column(0) & Chr(34)
          End If

          • #1118299

            NO, requirement I need to let them have no selection.
            But thanks for the idea, I am sure I can use it in future development.

    Viewing 0 reply threads
    Reply To: Just checking if true (Access2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: