Results 1 to 3 of 3
  1. #1
    wickedjc's Avatar
    wickedjc is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2016
    Posts
    3

    Question Msgbox-Combo

    I have a database that will be inactivated shortly however in the interim some of the users will need to be denied earlier, so I need to create a pop-up msgbox when they select their segment from a drop down. Sounded simple enough but I have had no luck so far. I've tried

    Private Sub Form_frmRequest

    If cboSegment.Value = "name of dept" then
    msgbox "message to be displayed"
    End If

    I also tried..
    Public Function Redirect()


    With Form_frmRequest
    If .cboSegment.Value = "name of dept" Then
    MsgBox "message to be displayed Thank you.", vbOKOnly, "Redirect Issue
    modPublicFunctions.ClearForm
    End If
    End With


    End Function

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    in the DEPT table, add a column MSG
    set the message in this col. you want for each dept, (or none)

    so when the user picks the combo, show msg

    Code:
    sub cboBox_afterupdate()
       if not isnull(cboBox.column(1) ) then
          msgbox cboBox.column(1)
      endif
    end sub
    'NOTE remember in code, column numbers start with 1, so col 1, is cboBox.column(0), etc.
    you also must set the property of the combo , COLUMNS = 2

  3. #3
    wickedjc's Avatar
    wickedjc is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2016
    Posts
    3
    Thank you, I finally was able to get it to work the way I needed it to! I was putting the code in the wrong area and needed to continue with the
    AfterUpdate that was already in place, thanks again!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. SetFocus after MsgBox
    By NISMOJim in forum Programming
    Replies: 18
    Last Post: 12-12-2012, 08:44 PM
  2. Replies: 2
    Last Post: 06-01-2012, 08:10 AM
  3. Yes No msgbox
    By imintrouble in forum Access
    Replies: 3
    Last Post: 10-14-2011, 02:24 PM
  4. Caution MsgBox
    By rovman in forum Access
    Replies: 1
    Last Post: 10-02-2011, 05:40 PM
  5. MsgBox
    By Mtyetti in forum Forms
    Replies: 4
    Last Post: 07-27-2011, 01:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums