Results 1 to 4 of 4

Thread: help checkboxes

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2002
    Posts
    25

    Exclamation help checkboxes

    i need to know how to do this:
    if all checkbox on form are unchecked then msgbox("please select one")
    else goto form2

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: help checkboxes

    As long as they're bi-state checkboxes:

    VB Code:
    1. If Not CBool(Check1.Value Or Check2.Value Or Check3.Value) Then
    2.     MsgBox "Please Select One"
    3.   Else
    4.     ' Go to Form2
    5.   End If

  3. #3
    Lively Member
    Join Date
    Dec 2005
    Posts
    112

    Re: help checkboxes

    if check1.value=0 Or check2.value=0 then
    MsgBox "Please Select...... "
    end if

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: help checkboxes

    Taking both examples and using VB Intrisic Constants:
    VB Code:
    1. If Check1.Value = [b]vbUnChecked[/b] And Check2.Value = vbUnChecked  And Check3.Value = vbUnChecked Then
    2.     MsgBox "Please Select One", vbOkOnly + vbInformation, App.EXEName
    3.   Else
    4.     ' Go to Form2
    5.   End If
    Last edited by Bruce Fox; Mar 6th, 2006 at 03:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width