• How not to open a report ? (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How not to open a report ? (Access 2000)

    • This topic has 2 replies, 3 voices, and was last updated 22 years ago.
    Author
    Topic
    #386933

    Change you statement:

    If Me![Office] = False Then

    to:

    If IsNull(Me![Office]) Then

    Viewing 0 reply threads
    Author
    Replies
    • #673311

      (Edited by charlotte on 03-May-03 06:47. remove unnecessary line breaks)

      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

      • #673412

        Is Office a control on your form? if so, is it a checkbox? Could its value be Null (which is different than False)?

    Viewing 0 reply threads
    Reply To: How not to open a report ? (Access 2000)

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

    Your information: