Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 15th, 2003, 02:59 AM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default combo boxes

hi,

i have a combo box and a submit button. user will select a record in the combo box and click on the submit button to proceed on further.
how do i check if the user did not select any values for the combo boxes and click on the submit button???

how do i prompt a error msg if user does that??

pls advice!!
nono:D

Reply With Quote
  #2 (permalink)  
Old October 15th, 2003, 09:38 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oxford, , United Kingdom.
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nono

Philosophical point first - The question is not 'How do I tell the user they have done something wrong', the question is 'How do I stop the user doing the wrong thing?'

In this case you need to disable the submit button until the user has selected something from the combo box.

Assuming the Submit button is disabled in the form design, that the button is called btnSubmit and the combo box is called cmbChoice, you'll need to place the following code in the combo box's AfterUpdate event:

If nz(me.cmbChoice,0)<>0 then
    me.btnSubmit.enabled=true
else
    me.btnSubmit.enabled=false
End If


Brian Skelton
Braxis Computer Services Ltd.
Reply With Quote
  #3 (permalink)  
Old October 15th, 2003, 09:00 PM
Authorized User
 
Join Date: Oct 2003
Location: , , .
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

great!

thanks! it works!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Boxes nbuckwheat Access 1 January 15th, 2006 09:26 AM
3 combo boxes ttkt Beginning PHP 0 July 2nd, 2005 02:20 PM
Combo boxes socoolbrewster Access 1 March 4th, 2004 09:28 AM
Combo Boxes tjs206 VB Databases Basics 2 December 10th, 2003 05:20 PM
Combo Boxes Louisa Beginning VB 6 2 September 10th, 2003 09:26 AM



All times are GMT -4. The time now is 03:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.