Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    alert user of data (2003)

    Hello,

    I have a form that has 2 cascading combos and 5 subforms that are populated on this form. I also have 2 command buttons that will run a queries that will provide more information(too large to make subforms of these queries). What I want to do is to alert them to hit the command buttons because there is data there. I would need to alert them somehow(message box, flashing of the command button or something). what would be the best way to approach this?

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

    Re: alert user of data (2003)

    When do you want to alert the user? When the form is opened, or when they select something from a combo box, or ...?

  3. #3
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: alert user of data (2003)

    I would say after the last combo box is selected becaused the query would be based off that combo and the one before.

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

    Re: alert user of data (2003)

    You could put code in the After Update event of the last combo box:

    Private Sub Combo2_AfterUpdate()
    MsgBox "Please click one of the command buttons for more info.", vbInformation
    End Sub

    Substitute the correct name for Combo2.

  5. #5
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: alert user of data (2003)

    Would this msg box occur if there there was no information in that command button for that query?

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

    Re: alert user of data (2003)

    Of course. Unless you build in a test, for example (again, substitute the correct names):
    <code>
    Private Sub Combo1_AfterUpdate()
    If DCount("*", "QueryName") = 0 Then
    MsgBox "There are no data.", vbInformation
    Else
    MsgBox "Please, please, please click a command button!", vbInformation
    End If
    End Sub</code>

  7. #7
    2 Star Lounger
    Join Date
    Jun 2005
    Location
    Atlanta, Georgia, USA
    Posts
    208
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: alert user of data (2003)

    Thanks it works.

  8. #8
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: alert user of data (2003)

    I don

Posting Permissions

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