Consulting

Results 1 to 5 of 5

Thread: Adding 2 information pop boxes to a yes/no drop down list box. Any ideas? using vba?

  1. #1
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location

    Adding 2 information pop boxes to a yes/no drop down list box. Any ideas? using vba?

    I have a yes/no drop down list box. What i'm trying to do is whenever yes or no are selected a pop-up message will be dispalyed. I have access 2007. Do any of you experts know or have any sample code on how I can achieve this to work?


    Thanks for your ideas

  2. #2
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Wedd,

    Not to put a thorn in your side, but didn't we already go over this? Click the [...] button in the AfterUpdate event box for the drop down box properties. Then insert the code with exception to the afterupdate and end sub.

    [vba]
    Sub AfterUpdate()
    Call MsgBox("Prompt", messageType, "Title")
    'Where messageType is the chosen type vbOKOnly, vbOKCancel, vbCritical,
    'vbInformation, vbExclamation etc... you'll get autocomplete to give you
    'the available choices
    End Sub
    [/vba]
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  3. #3
    VBAX Mentor
    Joined
    Aug 2010
    Posts
    457
    Location
    Yes, I do remember but I didn't receive many responses..so I've been a bit more specific...I received repsonses that it couldn't be done..but I had a hunch that it could be done. Anyway, I knew someone or I would crack it...thanks again!

  4. #4
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    You cannot do a Yes/No MsgBox from a macro, but from VBA you can do it.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  5. #5
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    257
    Location
    There is a great tutorial with examples dealing with forms and dialog boxes.
    May not be exactly what you're looking for, but I'm sure you'll gain a lot of insight on the subject.
    see http://www.fontstuff.com/access/acctut19.htm

Posting Permissions

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