Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: How not to open a report ? (Access 2000)

    Change you statement:

    If Me![Office] = False Then

    to:

    If IsNull(Me![Office]) Then

  2. #2
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How not to open a report ? (Access 2000)

    <P ID="edit" class=small>(Edited by charlotte on 03-May-03 06:47. remove unnecessary line breaks)</P>How not to open a report ?
    I am looking for a way to stop the execution of a code for opening a report in case the customer has not chosen an option.However it
    seems that my way of doing things is not right.My option box is called Office,and i have put the command Exit Sub in case no option is chosen, but Access seems to neglect my command.Where am i wrong?

    The command i have is the following :

    If Me![Office] = False Then
    MsgBox " Please select a city"
    Exit Sub
    Else
    Dim stDocName As String
    Select Case Me![FrameCalls]
    Case 1
    stDocName = "CallsCustomers1"
    Case 2
    stDocName = "CallsCustomers2"
    End Select
    DoCmd.OpenReport stDocName, acPreview
    End If

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: How not to open a report ? (Access 2000)

    Is Office a control on your form? if so, is it a checkbox? Could its value be Null (which is different than False)?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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