If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Not In List Data Additions - Default MSGBox to No?
I have a MSGBox prompt that appears on my form if someone enters text into a
Combo box that's not in that list. The MSGBox basically says "XXX is not in the list, do you wish to add it?" There's a yes and a no tick box. The problem is that the Yes option is always highlighted so if the user presses enter by accident, that entry is added. How do I get the MSGbox to have No highlighted by default instead of Yes? |
#2
|
|||
|
|||
Not In List Data Additions - Default MSGBox to No?
Use:
MsgBox("Add it?", vbYesNo+vbDefaultButton2) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Richard Horne" wrote in message ... I have a MSGBox prompt that appears on my form if someone enters text into a Combo box that's not in that list. The MSGBox basically says "XXX is not in the list, do you wish to add it?" There's a yes and a no tick box. The problem is that the Yes option is always highlighted so if the user presses enter by accident, that entry is added. How do I get the MSGbox to have No highlighted by default instead of Yes? |
#3
|
|||
|
|||
Not In List Data Additions - Default MSGBox to No?
Thanks Allen.
That was easy! But I couldn't find that info anywhere. "Allen Browne" wrote: Use: MsgBox("Add it?", vbYesNo+vbDefaultButton2) -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Richard Horne" wrote in message ... I have a MSGBox prompt that appears on my form if someone enters text into a Combo box that's not in that list. The MSGBox basically says "XXX is not in the list, do you wish to add it?" There's a yes and a no tick box. The problem is that the Yes option is always highlighted so if the user presses enter by accident, that entry is added. How do I get the MSGbox to have No highlighted by default instead of Yes? |
Thread Tools | |
Display Modes | |
|
|