Page 1 of 4 123 ... LastLast
Results 1 to 15 of 46
  1. #1
    Join Date
    Sep 2002
    Posts
    79

    Unanswered: Lists and check boxes

    I need some help.

    I have created a form and in the form, I need to have a list of about 100 titles and a check box next to each title (the check boxes are for the titles I want to select).

    Now in my form, I want the same list to be in every record, but, I would like the check boxes to clear when I create a new record. I want each record in my form to have the specific check mark I clicked. I don’t want the same clicked check boxes for every record.

    Basically, each record has different titles selected.

    How can I do this.

    Any help is greatly appreciated.

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Lists and check boxes

    Originally posted by alex8111
    I need some help.

    I have created a form and in the form, I need to have a list of about 100 titles and a check box next to each title (the check boxes are for the titles I want to select).

    Now in my form, I want the same list to be in every record, but, I would like the check boxes to clear when I create a new record. I want each record in my form to have the specific check mark I clicked. I don’t want the same clicked check boxes for every record.

    Basically, each record has different titles selected.

    How can I do this.

    Any help is greatly appreciated.
    Try this in the Form_Current event procedure.
    I'm assuming that the checkboxes are not bound to anything.


    Dim ctl As Control, ctls As Controls
    Set ctls = Me.Controls
    With ctls

    For Each ctl In ctls
    If ctl.ControlType = acCheckbox Then
    ctl = False
    End If
    Next

    End With

    Hope this helps.

    Gregg

  3. #3
    Join Date
    Oct 2003
    Location
    Boston, Mass. USA
    Posts
    81
    why check boxes? (radio buttons) with 100 of these you will have to scroll down several screenfuls. Is a combo box (drop down list) possible? YOu can select several items, I guess the disadvantage is you can't quite as easily see which ones you've chosen.

  4. #4
    Join Date
    Sep 2002
    Posts
    79
    Gregg what you suggested does not work for me.

    Looking at a long list is not a problem. Just having that list be independent in each record is my main concern.

    Anything i can do?

  5. #5
    Join Date
    Oct 2003
    Location
    Boston, Mass. USA
    Posts
    81
    I'm not sure that I understand what you're trying to do, but it sounds like a subform might be something to explore? Good luck.

  6. #6
    Join Date
    Sep 2002
    Posts
    79
    yes i want a subform, but, it links id#'s so i will only get 1 list out of hundred and it wont be specific to each record....ARGH

  7. #7
    Join Date
    Oct 2003
    Location
    Boston, Mass. USA
    Posts
    81
    um, so are you saying the items in the list are going to depend on a list in a table - in other words what titles available to check off today are not going to be the same available to check off next week or next month? (what I'm picturing is an order form and having the list of books currently in stock appear with a check box next to each, since the list of books in stock this week will be different than the ones in stock next week.)

    i could be off, i'm trying to figure out what exactly you're trying to do and not sure I understand. Maybe if you could be a little more specific about the application that you're trying to create.

  8. #8
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Question

    Originally posted by alex8111
    yes i want a subform, but, it links id#'s so i will only get 1 list out of hundred and it wont be specific to each record....ARGH

    Are you wanting to save the selections permanently with each record, as in table fields?

    If this is the case then you will need to create a table structure to support this. If these selections are bound to a field(s) in your tables then they will retain their values automatically, and for each new record they will be whatever you have set the default value to be.

    Let us know if you want to retain the values for each record because this makes it bound data and the approach is a little different than just clearing some controls on a form.

    Gregg

  9. #9
    Join Date
    Sep 2002
    Posts
    79
    OK, what I need I guess is not as simple as I thought it would be.

    Basically, I will try to explain it as simple as I can.

    I have a form called clients. In that form, I have records of different companies.
    In the same form, I need to have a list of 100 titles. Next to each title I need one or two check boxes to select a specific title.

    So lets say im in record #4 of 4 and I select 16 of those titles.

    If I go to a new record (#5 of 5) I would like that selections to refresh for a new record, but, keep the selected titles for record #4.

    If I try to do a subform, it will try to link ID #s and I will only get 1 title not all 100.

    What can I do? I tried creating a new table and entering all 100 fields as a “yes/no”, but, that only allows for one type of selection – What if I need to have two check boxes next to each titles (lets say one for “sent” titles and one for “sold titles” – Im an stuck.

    Any help is greatly appreciated.

  10. #10
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Question

    Originally posted by alex8111
    OK, what I need I guess is not as simple as I thought it would be.

    Basically, I will try to explain it as simple as I can.

    I have a form called clients. In that form, I have records of different companies.
    In the same form, I need to have a list of 100 titles. Next to each title I need one or two check boxes to select a specific title.

    So lets say im in record #4 of 4 and I select 16 of those titles.

    If I go to a new record (#5 of 5) I would like that selections to refresh for a new record, but, keep the selected titles for record #4.

    If I try to do a subform, it will try to link ID #s and I will only get 1 title not all 100.

    What can I do? I tried creating a new table and entering all 100 fields as a “yes/no”, but, that only allows for one type of selection – What if I need to have two check boxes next to each titles (lets say one for “sent” titles and one for “sold titles” – Im an stuck.

    Any help is greatly appreciated.
    Can you describe the tables that you are using to base this form and its controls on?

    Gregg

  11. #11
    Join Date
    Sep 2002
    Posts
    79
    The table is a simple table with a few contact information details, dates etc.

    The hard part is having a list of about 100 titles in that table with more than one checkbox dedicated to one title.

  12. #12
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile

    Originally posted by alex8111
    The table is a simple table with a few contact information details, dates etc.

    The hard part is having a list of about 100 titles in that table with more than one checkbox dedicated to one title.
    It sounds to me like you don't have your tables structured to support what you are trying to do. If you are trying to link contacts with multiple titles then I would suggest a Contact table, a Titles table and a linking table that contains the ContactID and the TitleID.

    If you want to post your DB, I'm sure you'll get some additional help.

    Gregg

  13. #13
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    Originally posted by alex8111
    The table is a simple table with a few contact information details, dates etc.

    The hard part is having a list of about 100 titles in that table with more than one checkbox dedicated to one title.
    One of the fields in your table should be a Yes/No field - this will record the value for each record. When you display the table in your form it will automatically display it as a check box with the saved value for each record. Just set the defaultvalue to False so that it is cleared for a new record. You can set this in the table design and this will copy through to forms (only new forms or if the control is added as a new control to a form). On an existing form you will have to set the default value of the control to false

  14. #14
    Join Date
    Sep 2002
    Posts
    79
    OK lets try something different.

    If I make a separate table for titles only, and I have 100 checkboxes (each checkbox is for 1 title), how can I have a second checkbox dedicated to a specific title.

    So basically, lets say I have 100 titles, I want to have two or more check boxes dedicated for one title (for different selections), and, at the same time, all 100 titles are in the same form (record) – So those 100 titles all would have the same record ID number.

    Different records in the table would just vary on how the check boxes are clicked.

    How would I do this?

  15. #15
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    Originally posted by alex8111
    OK lets try something different.

    If I make a separate table for titles only, and I have 100 checkboxes (each checkbox is for 1 title), how can I have a second checkbox dedicated to a specific title.

    So basically, lets say I have 100 titles, I want to have two or more check boxes dedicated for one title (for different selections), and, at the same time, all 100 titles are in the same form (record) – So those 100 titles all would have the same record ID number.

    Different records in the table would just vary on how the check boxes are clicked.

    How would I do this?
    You can have as many Yes/No fields as you like in one table. A Yes/No field is like any other filed in a table and will store what ever value you want on a per record basis

Posting Permissions

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