Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2009
    Posts
    9

    Question Unanswered: Help with Check Boxes!!!

    I'm in the process of creating a database with one form that has a lot of check boxes. I would like some of them to automatically select if others are. For instance, i have bound check boxes called European, British, French, German, Asian, Chinese, Japanese, etc. etc. and I would like European to be automatically checked if any european countries are selected or Asian automatically selected of any Asian countries are. Is this possible and if so how?!

    Please bare in mind I am an eager learner, but still at the beginner stage of programming and database design.

    Thank you so much!!!

    Oh btw, Im using Access 2003
    Last edited by angelmosue; 03-17-09 at 15:28.

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Welcome to the forums.

    Are these relationships defined anywhere in the tables? That is to say, is there a table anywhere that relates the values together (British to European, German to European, Japanese to Asian, etc.)? Otherwise you can define the rules in the code; this is generally frowned upon but can be easier to do once. Basically, how do you want to define the rules?

    I should probably ask how these values are being used as well, as you may first want to make sure your database is normalized.
    Me.Geek = True

  3. #3
    Join Date
    Mar 2009
    Posts
    9
    Quote Originally Posted by nckdryr
    Are these relationships defined anywhere in the tables? That is to say, is there a table anywhere that relates the values together (British to European, German to European, Japanese to Asian, etc.)?
    No there isn't. Should I create this? And sorry to seem like a complete novice, but how? That does sound like a good way of solving part of my problem.

    Quote Originally Posted by nckdryr
    Basically, how do you want to define the rules?
    Basically I would like that if a european country is selected it automatically selects European, whether the user remembers to or not. It is for display, consistancy and search purposes. I, at some point, will create a report that will display this information and I need European to come up. Also for searching purpose.

    Quote Originally Posted by nckdryr
    make sure your database is normalized.
    I think it is!!

    Thanks

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by angelmosue
    No there isn't. Should I create this? And sorry to seem like a complete novice, but how? That does sound like a good way of solving part of my problem.
    ...
    Basically I would like that if a european country is selected it automatically selects European, whether the user remembers to or not. It is for display, consistancy and search purposes. I, at some point, will create a report that will display this information and I need European to come up. Also for searching purpose.
    The way I would do this is to create a table of parent/child relationships and then look them up onclick events making a dynamic set of rules. But, and no offense intended, I think this might be a little past your skill level. Like I said in the first post, it might be more feasible for you to hard code this into your form. So when a checkbox is clicked (look at the OnClick property of the checkbox) you would set the other checkboxes appropriately. The down-side to this (and this is why it's frowned upon) is that if you decide to add another entry later on (say Saudi Arabian to Middle Eastern, or Australian to Asia-Pacifican, or whatever), you'll have to come back and change the code to match the addition/deletion.
    Quote Originally Posted by angelmosue
    I think it is!!
    This is something you're going to want to confirm as it is the foundation for your database; if you don't get your table design right from the start you're going to have a lot of headaches later on and run into a lot of impasses.
    Me.Geek = True

  5. #5
    Join Date
    Mar 2009
    Posts
    9
    I think you are right, the first option you came up with does sound completely past my skill level!! No offence taken! I will give your second option a bash.

    I am pretty sure my database is normalized. I have had headaches with previous databases so was careful this time.

    Thanks

    EDIT: I see what you mean about the disadvantages, but at least it is doing it. Thanks again for your help.
    Last edited by angelmosue; 03-17-09 at 19:38.

Posting Permissions

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