Results 1 to 7 of 7
  1. #1
    nickh is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    3

    Checkboxes in Continuous Forms View All Linked


    I have been using Access for about a year, but only doing basic relational databases and queries. Now I would like to start expanding my skills to include more functional forms and reports. My first attempt at forms is to create a sign in sheet for an organization's events. I would like to use a table of members to populate a form where the person checking in each member could simply check the checkbox in front of each member's name and have Access automatically add a record in an event_attendance table.

    My research so far showed me that I can create the form with all the members listed by changing the form's Default View property to "Continuous Forms". I then can add a checkbox in front of each member's name and view it in "Form View" without any issues. However, checking the checkbox in front of any member's name results in the checkboxes in front of every member's name being checked as well. Is there a way to decouple the checkboxes in a Continuous Form?

    After that I'll have to find a way to create a record using that member's information and some information about the event. I assume that will involve adding some VB code to the checkbox's Event > On Click property unless someone knows of an easier way to achieve the same results.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    In order to not have the checkbox in front of everyone's name in a continuous form you would need to Bind that checkbox to a field in the recordsource of the form, which means you would probably need to add a field to that table. You might consider a Command Button instead that would add a record to the event_attendance table. You could add a Message Box to the code to make sure they intended to press the button.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Edit: Hah, I took too long to type.

    A continuous form is simply a little magic trick that displays all of the records within a recordset at one time. If you open a form in Form View, you will see one record within the recordset. While in form view, you can navigate to the next record, or the last record, or the precious record, etc. All the while, only one of the records within the set is active or Current.

    A similar thing happens with the Continuous form. When you click on a record within Continuous View, that record has the focus and, therefore, that record is the Current Record. The Controls are just there to represent a field. The magic is that the controls are, really, one control repeated many times.

    In your case, you are using an unbound control. It is not associated with a field. When you select a record within the set, the control is not associated with the current record. It is associated with nothing. It is unbound.

    Maybe you can add a column to your table that would indicate if a specific record is earmarked for Attending or AttendHold or ...

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    @ItsMe: It is because the air is thinner up here!

  5. #5
    nickh is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    Sep 2016
    Posts
    3
    Thanks RuralGuy. That fixed the issue with the checkboxes being linked together. I just created a Yes/No field in the membership table which allowed me to bind the checkbox to something that wouldn't corrupt my data.

    I had thought about using a button, but thought it would be more intuitive if the person checking in people viewed it as a check list. Having a button that looked the same after it was clicked could leave the person checking in the member uncertain if they had actually recorded that person's name. Essentially the checkbox provides a positive indication some action was actually performed for that member that I don't think a button would provide.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    You're very welcome. Glad we could help.

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    this is an alternative - doesn't use checkboxes, but also doesn't require a yes/no field in the table.

    https://www.accessforums.net/showthr...773#post330773

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

Similar Threads

  1. Replies: 18
    Last Post: 09-10-2016, 05:22 PM
  2. Subform in continuous default view
    By gykiang in forum Forms
    Replies: 2
    Last Post: 03-29-2015, 12:22 PM
  3. Replies: 1
    Last Post: 04-24-2014, 05:10 PM
  4. Replies: 2
    Last Post: 01-28-2014, 10:13 PM
  5. CREATE VIEW syntax for linked SQL view
    By DavidT in forum SQL Server
    Replies: 2
    Last Post: 10-17-2013, 02:48 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