I'm diligently trying to relearn Access after a 10 year hiatus. So you may see me a lot.
I have an attendance form that is filled out weekly that will update in my table for with correct date. I have 2 details that I would like to solve. The first is that when I check off who was in attendance and update my table, I am unable to clear the checkboxes so that I can start from scratch with my attendance. I would like a button to clear them.
The other issue I am having is my Refresh/RunQuery button in the same form. I use this button to update my table. The problem is that when if I push the button before I'm done, I will have duplicates for every time I push the button. I have set up a Look for duplicate Records query, but I am wondering if this is the easiest way.
...when I check off who was in attendance and update my table, I am unable to clear the checkboxes ...I would like a button to clear them...
Burrina's code won't do this; this will, placed in the OnClick event of your aforementioned Command Button:
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("Table/QueryName")
Do While Not rs.EOF
rs!TempAttendance = 0
Set rs = Nothing
You'll need to replace Table/QueryName with the actual name of your Form's RecordSource.
I'm not sure what I am doing wrong, but here is the code that I used. I still couldn't get it to work. The question I have is: tblINDIVIDUALS is a linked table from another database; I have a query that organizes the names in alphabetical order and that query (queryINDIVIDUALS) is what is used to create the form. I tried using both the table and the query and neither worked.