PDA

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



wedd
11-01-2010, 01:45 PM
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:friends:

Imdabaum
11-01-2010, 03:07 PM
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.


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

wedd
11-01-2010, 06:21 PM
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!

Imdabaum
11-02-2010, 05:50 AM
You cannot do a Yes/No MsgBox from a macro, but from VBA you can do it.

orange
11-02-2010, 08:21 AM
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