Results 1 to 4 of 4
  1. #1
    turntabl1st is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    9

    If Checkbox Is Unchecked Then Combo Box Required Web Database

    Click image for larger version. 
<br /><script async src=
    Name: Capture.PNG  Views: 15  Size: 10.1 KB  ID: 8666" class="thumbnail" style="float:CONFIG" />


    I have a checkbox in a web database that if left unchecked i would like to be able to have the ability to make two combo boxes and one text box field required before saving a record on a form

    notsciquest ------> scicategory, sciuom, and sciproductsize

    any help creating a macro or a way to do this would be greatly appreciated!!

    thanks!

  2. #2
    jameslarsen is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jul 2012
    Location
    Los Angeles, CA
    Posts
    20
    The way I would do this is on the submit command. Do a nested if statement to first check if the checkbox is checked, and if it is, to see if any of the "required" fields are populated. Pseudo-code below:

    If Checkbox = 1 Then
    (
    If Field1 = null Or Field2 = null Or Field3 = null Then
    Msgbox("Fields 1, 2, and 3 are required.")
    Exit Sub
    )
    Submit Form

    If the checkbox is not checked, or the checkbox is checked and all the fields are populated, then the form is submitted, otherwise, it exits. I hope this makes sense and helps you out. Let me know if you have any questions.

  3. #3
    turntabl1st is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    9
    How would this fit into a macro for a web database?

  4. #4
    turntabl1st is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    9
    Here was the solution for anyone interested.. Also this was a subform within a form so your variables may be different

    Click image for larger version. 

Name:	Capture.PNG 
Views:	10 
Size:	41.4 KB 
ID:	8711

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Linking checkbox to combo box
    By greatether in forum Forms
    Replies: 2
    Last Post: 12-19-2011, 12:14 PM
  2. Replies: 3
    Last Post: 05-15-2011, 10:52 PM
  3. combo box based subform and query help required!!
    By crustycrab101 in forum Forms
    Replies: 3
    Last Post: 05-03-2011, 01:39 PM
  4. Horses database help required
    By arnie in forum Database Design
    Replies: 8
    Last Post: 04-26-2011, 08:34 PM
  5. Simple database required
    By Steve in forum Database Design
    Replies: 2
    Last Post: 03-09-2010, 06:34 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
  •  
Other Forums: Microsoft Office Forums