A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Not In List Data Additions - Default MSGBox to No?



 
 
Thread Tools Display Modes
  #1  
Old June 21st, 2006, 03:13 PM posted to microsoft.public.access.forms
Richard Horne
external usenet poster
 
Posts: 19
Default 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  
Old June 21st, 2006, 03:23 PM posted to microsoft.public.access.forms
Allen Browne
external usenet poster
 
Posts: 11,706
Default 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  
Old June 21st, 2006, 04:28 PM posted to microsoft.public.access.forms
Richard Horne
external usenet poster
 
Posts: 19
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.