• warning message (Access 2000)

    Author
    Topic
    #425138

    In my report called rptStockFlow i have the products underlined with red if balance is not equal to in – out:

    Const conNormal = 400
    Const conHeavy = 900 ‘ exra bold

    Private Sub Detail_Format(Cancel As Integer, FormatCount As

    Integer)
    If Me![balance] Me!In – Me!Out Then
    Me!balance.FontWeight = conHeavy
    Me!balance.ForeColor = 32768
    Else
    Me!balance.FontWeight = conNormal
    Me!balance.ForeColor = 0
    End If
    If Me![balance] Me!OnStore Then
    Me!OnStore.FontWeight = conHeavy
    Me!OnStore.ForeColor = 255
    Else
    Me!OnStore.FontWeight = conNormal
    Me!OnStore.ForeColor = 0
    End If
    End Sub

    is it possible in the Onopen event of the report to create
    some code that sends a warning message on the screen,that something is
    wrong with the balance of the goods ?

    Viewing 0 reply threads
    Author
    Replies
    • #978595

      Something along these lines should do it. You might have to replace the calculation that triggers the warning but it is a start.

      Private Sub Report_Activate()
      If Me![balance] Me!In – Me!Out Then
      MsgBox “The balance reflects ” & me![Balance] & ” while the In minus Out amount equals ” & me!In – Me!Out
      else
      endif
      End Sub

    Viewing 0 reply threads
    Reply To: warning message (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: