Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Oct 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    warning message (Access 2000)

    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 ?

  2. #2
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: warning message (Access 2000)

    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

Posting Permissions

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