Continuous Form, "Reset" button

2wistd

Registered User.
Local time
Yesterday, 18:36
Joined
Jan 17, 2013
Messages
66
Hello again, another question for you so I can inch closer to completing my project. I am creating a program to allows us to figure out where our personel are. I am using a continuous Form that shows the individuals name, phone numbers etc. and infront of that is a checkbox, and a combobox that shows "Leave", "TDY", "Contacted" etc. I also have two fields that fill up with what time they were contacted or when they reported in. The default status is "Not Attempted and the checkbox is not checked, and the time fields are blank.

I attemped to use this code:

Dim ctl As Control
For Each ctl In Me.Controls
Select Case ctl.ControlType
Case acCheckBox
ctl.Value = False
Case acComboBox
ctl.Value = "Not Attempted"
End Select
Next ctl


but it will only clear the one line (it doesn't clear the times yet, i figure i'd add that once I figure out to clear one). This seems to work if this was a single form, but not for continuous. How can I convert this for continous forms?

Thanks
 
Me.Controls referes to the current record, i.e. one line in a continuous form.

There are a number of possible solutions but I would think the easiest one to use would be an update query
 
I would recommend using an update query if you need to modify multiple records (rows). It is efficient and very little code required.
 

Users who are viewing this thread

Back
Top Bottom