By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,117 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,117 IT Pros & Developers. It's quick & easy.

Msgbox help

P: 58
I have 2 listboxes that generate tables when a command button is clicked on. If only one option is selected or none options in the lsitboxes are selected, and the command button is clicked, i want to have a msgbox pop up indicating that they need to select info in BOTH listboxes to continue.
May 11 '07 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
Perhaps something like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCommandButton_Click()
  2.  
  3. If IsNull(FirstListBox) Or IsNull(SencondListBox) Then
  4.    MsgBox ("You need to select info in BOTH listboxes to continue.")
  5. End If
  6.  
  7. End Sub
May 11 '07 #2

P: 58
Perhaps something like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub YourCommandButton_Click()
  2.  
  3. If IsNull(FirstListBox) Or IsNull(SencondListBox) Then
  4.    MsgBox ("You need to select info in BOTH listboxes to continue.")
  5. End If
  6.  
  7. End Sub
If something is not Null, what is it? I have to tell it that if there ARE values, go to my query..how would i go about doing so?
May 11 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.