Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Just checking if true (Access2003)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Just checking if true (Access2003)

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

  3. #3
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just checking if true (Access2003)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Just checking if true (Access2003)

    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

  5. #5
    5 Star Lounger
    Join Date
    Jan 2005
    Posts
    614
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Just checking if true (Access2003)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •