Results 1 to 6 of 6
  1. #1
    StarryEyed416 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    3

    Message Box in Subform - combo box

    Hi,



    I have a combo box in a subform that has three options in it (MA, OA, and RC). When either one of these options are selected I would like a message box to appear instructing the user that by choosing these options, changes need to be made elsewhere. Previously I had this set up on a combo box in the main form and it works like a charm. The page was redesigned though and that option is now part of a subform. I assumed I would be able to use the same code but it doesn't seem to be working.

    Here is the code I had on a combo box in the main form before the change:

    Private Sub PrimeJointSplit_Click()
    If [PrimeJointSplit] = "Y" Then
    MsgBox "NOTE: Selecting Yes for this option requires the use of the Mailing-Address-Formula component in Dialogue."
    End If
    End Sub

    Here is what I thought would work for the subform (I tried this using one selection first just to see if it works... which it doesn't):

    Private Sub Combo32_Click()
    If [Combo32] = "MA" Then
    MsgBox "NOTE: Selecting Yes for this option requires the use of the Mailing-Address-Formula component in Dialogue."
    End If
    End Sub


    Any suggestions? I'll need this to work for all three options too (MA, OA, & RC). Thanks in advance for your help!!

  2. #2
    Bradonnmorgan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    13
    Hello there! Im not sure if this covers everything you need. If it isnt let me know and ill add some more code for you. I hope this helps!!!!

    Place this in your combo box on click:
    If Me.Combo0.Text = "MA" Then
    MsgBox "Note: This would be your message for MA selected"
    End If
    If Me.Combo0.Text = "OA" Then
    MsgBox "Note: This would be your message for OA selected"
    End If
    If Me.Combo0.Text = "RC" Then
    MsgBox "Note: This would be your message for RC selected"
    End If

    Change combo0 to whatever your combo box name is.

    Also on the Form Load section put

    Me.combo0.value = ""

    ^_^

  3. #3
    StarryEyed416 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    3
    That worked!!

    Thank you so much!

  4. #4
    Bradonnmorgan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    13
    Not a problem, Im glad to help! Also if all your questions are solved on this issue click the thread tools and the top and click make as solved ^_^ If you have any more questions please ask away and I will help in any way i can.

  5. #5
    StarryEyed416 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    3
    That should be it for now... although I may be back again soon. This database was dropped in my lap to maintain since the person who crated it retired. It's been a very long time since I've had to do any behind the scenes programming in Access... it's coming back slowly.

    Thanks again for your help, enjoy your afternoon!

  6. #6
    Bradonnmorgan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    13
    Aw thats never any fun. I hate when i get stuff like that just droped on me. Working with other peoples code is not as fun.
    You do the same! Thank you and glad to help!

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

Similar Threads

  1. Subform record count warning message
    By FJM in forum Access
    Replies: 5
    Last Post: 01-29-2013, 08:17 AM
  2. Replies: 11
    Last Post: 11-28-2012, 04:29 PM
  3. Replies: 33
    Last Post: 01-13-2012, 07:44 AM
  4. Replies: 5
    Last Post: 07-04-2011, 12:53 PM
  5. Replies: 1
    Last Post: 02-25-2011, 11:32 AM

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